Skip to main content

Full text of "Awesome Games for your Atari Computer (1984)(Addison-Wesley Publishers)"

See other formats


AWESOME GAMES 

FOR YOUR 
ATARI COMPUTER 

HAL RENKO/SAM EDWARDS 





... 



'^•aurt*^' 



Awesome GAMES for your 
ATARI computer 



Awesome GAMES for your 
ATARI computer 

Hal Renko and Sam Edwards 



▼ T 

ADDISON-WESLEY PUBLISHING COMPANY 

Reading, Massachusetts • Menlo Park, California 
London • Amsterdam • Don Mills, Ontario • Sydney 



® 1984 Addison-Wesley Publishers Limited 

All rights reserved. No part of this publication may be reproduced, stored in a 
retrieval system, or transmitted in any form or by any means, electronic, 
mechanical, photocopying, recording or otherwise, without prior written 
permission of the publisher. 

The programs presented in this book have been included for their entertainment 
value. They have been tested with care but are not guaranteed for any particular 
purpose. The publisher does not offer any warranties or representations, nor 
does it accept any liabilities with respect to the programs. 

Atari is a trademark of Atari Inc. 

Cover design by Stuart Hughes 
Illustrations by Agnes Lehar-Graham 

Typeset by Blackmore Press, Shaftesbury 

Printed in Finland by Werner Soderstrom Osakeyhtio, Member of Finnprint 

ABCDE 8987654 201 16477 9 



Contents 



Zombies in the swamp 


1 


Galactic Monsters 


6 


Keyboard Memory 


10 


Las Vegas a Go Go 


13 


Parrot 


22 


Kentucky Derby 


25 


Rainbow Square Dance 


30 


Qui Vive 


34 


STM 


46 


One to Five 


49 


Escher 


53 


Genius at Work 


59 


Shark Hunt 


63 


Shakespeararian Shuffle 


68 


Explosion 


72 


New York, New York 


78 


Key 


82 


Black Box 


86 


Treasure Hunt 


90 


I.T.— The Adventure of the Century 


95 


The Wolf and the Five Little Goats 


109 


Spring 


114 


Apollo 2000 


116 


At the Market 


124 


Fallout 


126 


Ship's Attack 


131 


Mini Mancala 


135 


Stop It! 


140 



The Swedish Popsong 143 

Vowels and Consonants 146 

Astrology 149 



Because the ATARI printer can't print graphic characters and reverse video, 
the following codes are used in the listings: 

Text between § are in reverse video. 

Text between [ ] should be entered while holding down the control key. 

Text between <^ ^-indicate a special key e.g. <Cj3HIFT^> means press shift 

key. 



Acknowledgements 



This book was born at the University of Twente in the Netherlands where we met the following 
games fanatics: H. Hermens, P. de Vries, A. Stapel, H. Riesebos, A. Rensink, M. Sijbenga, 
E. Groenhuis, W. Koolhoven, R. Bosch, A. Pelsmaeker, K. Boon, and B. Hoogstraten. We 
would like to thank them all for the many hours they spent with us, discussing, creating, and 
writing the programs for the games included here. 



Introduction 



Everybody knows that computers are used for all kinds of serious purposes — 
financial calculations, business applications and text processing, for instance. 
They can, however, help us in another way. As the proverb says 'All work and 
no play makes Jack a dull boy' and it's certainly true that we all need some- 
thing to keep the cogwheels of our mind turning when we are not considering 
the 'important' things in life. So we read books, do hobbies, and play games. 

Bruegel's wonderful painting 'Children at Play' shows us that this has been 
true for centuries, if not forever. 

This book aims to provide something for everybody from 6 to 96. There 
are games to play on your own, and others to play with your family and 
friends. You will find fast action games to test your reflexes and your ability to 
control many moving objects on the screen; puzzles and brainteasers to get you 
thinking; board games where you pit your wits against the computer; and, of 
course, some wonderful arcade-type games which combine aspects of all of 
these. There are also some very intriguing games which are in a class of their 
own. 

A number of the games have been devised to give interesting and worth- 
while results from relatively short listings that will not take much time to enter. 

Looking again at 'Children at Play' a thought springs to mind. If Bruegel 
were alive today, would his painting look something like this . . . 



Zombies in the Swamp 

Watch out! There are zombies about, and you have to cross the swamp where 
they live. To do this you must walk across on rafts. 
At the start of the game the swamp looks like this: 

WAY OUT 
t 



SWAMP 



t 



here you are, 
standing on a raft 

You are at one corner, and you must reach the diagonally opposite corner to 
escape. To put a raft next to the one you are standing on, enter T and the 
computer asks 

THROW TO THE? 

Enter N for north, S for south, E for east, or W for west, and a raft will appear 
in the appropriate position (north is at the top of the screen). To move, enter M 
and the computer will ask 



MOVE TO THE? 



Again, enter N, S, E, or W as appropriate, to step onto the raft. 

So far so good, but beware! From time to time one of those zombies will 
emerge from the swamp and run across the rafts you have positioned. If you 
are in its way it will catch you. Luckily, zombies can't see very well so they 
often fall off the rafts back into the swamp. 

To succeed in this exciting game you must develop your own strategy. The 
longer and more complicated your path the less likely the zombies are to catch 
you, but, on the other hand, it will take you longer to get across the swamp, 
giving time for more zombies to appear. 

Oh no! Here come those terrifying zombies again. You had better just 
hope they don't catch you. 

1(3 REfi ??### .i'oiTit. i es m (he swamp #### 

28 1 Pi SHf ? , a .:■ , CM i j , C$$< 4 ), ) $(. 3 ) 

M Din PL$i3>sl0mij.fLff.iJ f BL¥'-3) 

48 OPLN #2,4,W,"Ki " 

50 WRHF , HlCa v 4-7 

68 SOTO 1888 

93 REi'l w## i nit laiize ### 

1 88 PL*= " il't.JJJje " : Z0*= " f###6 " 



118 


BL*=" ":FL?= ■'..." 


128 


FOR C=8 10 ? 


1 38 


8H< 8 , .:■=- 1 : SW< C , '■'=- 1 


148 


SW . ; ' , C >=- 1 : oH< C , 8 >=- 1 


158 


NEST C 


1 £0 


St* ? , 8 .:■=- 1 : Sue , a >=- 1 


178 


SHC8,1 .5=1 :SN'; 1,8 j=l 


188 


FOR R=l 10 6: FOR C=l TO 7 


198 


St* R, 0=8! NEXT CSNEX1 R 


288 


F'K=6 : PV=? : SW< 6 ,?:■=! 


218 


X=8 : V=?: T*=PLSs SOSUB 1 788 


228 


RETURN 


239 


Rbf'l ### 9et command ### 


388 


SET #2,0: C*=CHR$< c > 


318 


FOR 1=1 TO LEN<CS$) 


326 


IF C*=CSS(I,I) THEN RETURN 



338 NEXT I: SOTO 308 

339 REM ### GET direction ### 
4@0 CS'$="NESw":GOSUB 380 

4 1 DK=C I =2 >-{ I =4 '} '■ DV=i. 1 =3 >-<■ . 1 = 1 J 

420 X-PX+Gx: V=PV+OV 

430 IF SM<PX+OX,PV+DVX >-l THEN RETURN 

440 POSITION 0#23 

450 ? #8 ; " i fflposs i b 1 e-TRV R6A IN"; 

460 POP : GOTO 520 

489 REf'l #*# execute command ### 

500 POSITION 0,23 

510 ? #6;" ??? "; 

520 CS$= " T I'i " : 60SU8 300 

530 UN i GOTO 608*700 

593 REI'i ### throw ### 

600 POSITION 0#23 

618 '? #6; "THROW TO THE ? "i 

£20 GOSUB 400:SWc:X,t.j=1 

630 IF X¥V>0 THEN T*=Fl_*!SQSU6 1?08 

640 RETURN 

639 REJ1 ### move ##* 



\^>-~M 




788 POSITION 0,23 

7i8 ? #6;"flQUE TO I'HE ? "; 

7'20 SOSUB 488:i_X=X:LY=V 

730 IF SH(X#VX>1 THEN POSITION 0,22:? # 

b;"inf,n the SUiampCfiHLJ HGRIN ? " 

;!80T0 i2aa 

740 IF X=8 OR V=0 THEN POSITION 0,22:? # 

Si "you made ittHf-O, A6AIN ? ":6 

GTO 1200 

750 X=PX:V=PY:T$=FL3;: GOSUB 1700 

760 PX=sLX:PV=LV 

770 X=LX : V=L V : T$=PL* : GOSUB 1 788 

788 RETURN 

799 REfi choose zombie's direction ### 

888 ON RND<8)$2+8.5 GOSUB 1300,1400 

810 IF SH<:2X+DX,2V+GVKl THEN 900 

820 IF SW<;ZX+BV,2t-DX>=1 OR SNi2X-DV,2V+ 

DX>=1 THEN 1000 

830 RETURN 

893 REl'l ### swamp ahead ###_ 

900 ON RNK 03*4+0. 5 GOSUB 1380,1400,1500 

,1600 

910 IF SW<2X+0X,2V+0V>=-1 THEN 900 

920 RETURN 

333 REi'l ### possible move ### 

1 008 LX=DX : l_V=DV 

1018 ON RNO<0.J*4+0.5 SOSUB 1380,1488,150 

8,1608 

1020 IF DX=-LX HND DV=-LV OR SW<2X+GX,2V 

+OVX1 THEN DX=LX:DV=LV 

1030 RETURN 

1833 REri ### zombie's turn ### 

1100 2X=6:2t=7:S0T0 1180 

1110 IF 2X=F'X HND 2V=PV THEN POSITION 8, 

22:? #8; "you have just been eatenLNHLJ 

HGHIN ?"#:60T0 1288 

1128 GOSUB 888 

1130 T*=FL$! GOSUB 1700 

1148 2X=2X+DX:2V=2V+DV 

1150 IF SN< ZX,2V >=8 THEN SW<2X,2V)=-1 :PO 

SITION 322X-2,3*2V-2:? #8i " @M "i RETURN 

1168 X=2X:V=2V:T$=20$: GOSUB 1788 

1178 SOTO 1118 



199 REfl ### again #*# 

288 POKE 764#225!6E1 #2#X 

218 IF X=89 THEN RUN 

228 GRAPHICS 8: END 

388 DX=0!OV=-l! RETURN :REI'I north 

488 DX=-1 5 DV=8: RETURN :REI'i roest 

588 L«=8:DV=l: RETURN SREfi south 

688 Dfi=i:DV=8: RETURN :REfl east 

699 REfl ### print field ### 

788 FOR 1=8 TU 2 

, ? 18 POSI TION XSS-SvfSS-S+l:? #6;TS 

?2U NEXT I: RETURN 

?99 REfl ##### mam program ##### 

888 SOSUB 188: REfl initialize # 

8l@ SOSUB 588: REfl player # 

g20 T i i=TU+ 1 : 1 F RNEK 8 m PX+PV ;■ >3 OR TU< t 

THEN 1818 

838 SOSUB 11 88: REfl zombies # 

84U SO TO 1818 



Galactic Monsters 



There it is, registering on the x-y-Gz radar. At last, you are approaching the 
Milky Way. In just 2.56 protoseconds you will be safe in your home galaxy! 
But there is danger here, and as captain of your ship, you know very well 
what it is. You keep a watchful eye on the XR6-screen. No alert yet. The 
tension is unbearable ... 2.5 protoseconds . . . 2.0 protoseconds ... 1.5 
protoseconds ... oh no! There it is — 

THE VAN ALLEN SQUARE STONE BELT 

There are a number of these notorious belts, and in them lurk the dreaded 
Galactic monsters. No weapon can defend you against these vengeful creatures; 
all you can do is avoid them. 

Once the program is started and you see a VAN ALLEN SQUARE 
STONE BELT then you can move yourself by pressing: 

- to move one SQUARE upward 

+ to move one SQUARE to the left 

* to move one SQUARE to the right 

= to move one SQUARE downward 

Those terrible Galactic monsters will approach closer and closer. Your only 
hope for survival is to avoid them! If you cross a VAN ALLEN SQUARE 
STONE BELT a second time, the monsters will become more aggressive. Some- 
how, they seem to anticipate your every move. If they manage to attack you 
five times, you and your ship are totally destroyed. 

Good luck, captain . . . only a few protoseconds to go, and you are home 
free! 

6 




la Kfci'l ####### L-iaiacT, ic [lonsters ####«## 
20 Dill Kt 11 },t\ ii ;',si ikx a#i ) 

JW UPhN *2*4#0#"K" 
4t1 MW'HiCS lb 

58 GOTO ayy 

hh REPI ff## initialize ### 

100 FOR 1=0 fQ a 

110 REfiQ K,V8S1 IK< l *".)=;<;: Si 1K<I #1 J=V 

120 Ntxi i 



130 OffTU i«i*i*-l*l«u.»u»<a»-l«i 

140 DATA -l*-lr-lrQr&r&r&rl*&r-l 

1 58 '? *6#" galactic monsters" 

lbO RETURN 

1 39 REri #ff# player's move ### 

200 SOUND &r 20 * 1 p 1 5 

210 KEY=STTCK':0 >: IF KEYOlS THEN DX=STIK 

( KEv-j,0>:Dv=Si IK';kEV-5,1 >:<S3TU 290 

220 IF PEEkc i : '64 :'=2'55 THEN 340 

230 GET #2,KEv:DK=o:DV=0 

240 IF K.Et=42 THEN DX=lSGUTO 290 

250 IF KEY=43 THEN DX=-1:GUT0 290 

260 IF KEV=45 (HEN LiV=-i:6UfU 290 

2?0 IF KEY=6i THEN Dv= 1:8010 29o 

280 SOTO 340 

290 IF HfcSc lO-xP-Dk>>5 THEN 0x=O 

300 IF HBS< 6-VP-DV »5 THEN DV=0 

310 T'OKN=TORN+1 

320 POSITION XFVt'P:? #bi"#"i 

330 XP=XP+D?<: tF-VP+UV 

340 POSITION XP,¥P!? #bi"t'L.JJi2"i 

350 SOUND OjO^OjO 

360 RETURN 

399 REl'i ##t move galactic monsters ### 

400 FOR T=0 TO 10 

410 POS I T I ON H< '(' > * V< T > s ? #6 ; '• # " i 

420 IF RNTXOHPR THEN GGSoB 500:6010 440 

430 G0S06 600 

440 POS IT 1 ON ?« T .:■ > 'A T .) : ' f #8 ; " EC J " i 

450 NEftl 1 

460 RETURN 

499 REl'l ffffff move monster to player »## 

500 IF RNLK ;>.>0. o THEN HX T ;-=X(. "I HS6NX ; : \P- 
K<T)>s RETURN 

5io Yt T.j=v< T >+S6N'; VP- v ■; I >>i RETURN 

599 REH ### move monster random ### 

600 H= I NT X RNEK >#4 ) 

6io ;« T . >=?& T >+< h=o AND K< T X 15 )-< fl=l hnD 

X( I J.>5i.) 

62o vi T >=YX I ;■+'; h=2 hnD y< T x 1 1 >-< h=3 hno 
yX i >>\ .) 

630 RETURN 

8 



699 hEiI #»* eaten oy monster ? ### 

i ; 'tia FOR 1=0 To i ti 

?l a If ?;K >h i ;■ OR Vf > «>V<T) MEN . : 'yu 

,-'20 K=K+i: 1=10 

r'38 SOUND 8*288* 18* 15s SOUND 1*280*8*15 

i"4a bOSUB yoo 

?'50 SOUND 8*248* 18* 15* SOUND 1*248*8*15 

f'6y SOSUB Soy 

," ?0 SOUND 8*8*8*0! SOUND 1*8*8*0 

?yy NEXf "i 

Cyy RETURN 

,-yy REi'l ### waiT. ### 

B08 FOR H=8 TO 180! NEXT H! RETURN 

899 REi'l *#fl## main program trittrtttf 

SOS GOSUS 1805 REO initialize # 

918 FOR 1=1 )o n 

32o POSH" i On 5*Ts? ffbj " ttffff ffffittirttirff u j 

350 nEk'i i 

340 SCORE=SCORE+hP- i 0RN-5#K 

350 HP=WP+2u:TORN=o:PR=PR+0. 1 

yyo xP=io:VP=i:POSi Hon xPj.tP:? »t;i"iiCoJ 



H,'t1 hUR 1=0 10 10 

980 ;« T .5=5+ i ': v; "i >=8 

S98 next i 

lOOO SOSoB 20o:Rbi'i player # 

1010 SOSUB ?oO:REl'l eaten ? # 

I020 IF KM ThEn iO?0 

ioSO if- vP=ii ThEn 910 

1040 S0SU6 400:R£T1 monsters # 

1050 fa'USuB ?'O0: REi'l eat-en ? # 

1000 if K<=4 THEN lOOO 

1070 POSITION 1*11 

1080 ? #6; "your gscoreg i=- "* SCORE 

1090 POSITION 8*0 

iiOO ? #S*"do you want again <ESOOQ''* 

11 10 POKE ( : K4,255:0ET #2,K.£Y 

ii20 If K.Ev=yy ThEn Ron 

1125 IP KEVO?S THEN 1110 

1130 IF K£V<>?8 ThEn mO 

1140 GRAPHICS 0:£nD 



Keyboard Memory 



This game uses the computer keyboard to test your memory. Eighteen of the 
keys each conceal a character, in the same way that a playing card, lying face 
down, hides its value. There are nine different characters, each hidden by two 
keys. 

The symbols of the keys you must concentrate on are shown on the screen. 

QWERTY 
A S D F G H 
Z X C V B N 

Press a key and the character it is hiding will be shown on the screen: press 
two, one after the other, and if they are both hiding the same character their 
symbols will disappear from the screen after you have pressed any other key. 
Your first few attempts will obviously be guesses but by memorizing the 
positions of the characters they show you should soon be able to work out 
where the pairs are. 



lfci Ktl'l :?::?::«*:?::* Keyboard fiemory :^?*«s- 

28 DIM KEV*< iy >,PIC$( 18>»K£VPIC*< 18), Kt* 

( 1 >*OSK< i,d> 

30 OPEN #2*4#8*"K: " 

+0 GRAPHICS 18: POKE 756*226 

50 SET COLOR 0,0,0 

yO 60 TO y00 

MS P.EI'1 initialize :?:;?::?: 

10 



iyy :" ffb;" gkeyboardg gmemoryg 

1 1 K.h V J— " qwer-T.yasd t ghzxc vt-n " 

120 PiC3="iK,, i i . . PPSSftRTTFFGGae" 

130 FOR KEV=1 TO 18 

1 4W PI Cn= J NTt i SsRNDt: «)+i) 

ISO IF PICSCPIC^PIODO 1 " " THEM 198 

168 PICN=F'1CN+1 

178 IF PICN>18 CHEN P1CN=PICN-18 

lay GOTO i58 

1 90 KtvPlUSt k£V*K£Y )=PIC#( PICN*P1CN ) 

2uU PIC$<PICNjiP1CN^=" " 

218 NEXT KE't': RETURN 

299 REi'l display Keys %%% 

308 FOR I=W TO 2: POSITION 4^2*1+4 

320 FOR J=l TO 6 

330 C=&l+Ji'r #8*KES>$<e*C>*" "; 

340 NEXT JsNEXT i: RETURN 

399 REl't input and snoai card t&% 

400 FOR NK'=8 TO l 

410 GET #2#KEVsKE*=CHR*<KEV+32) 

420 FOR 1=1 TO 18 

430 IF KE*=KE¥*(I*1 ') hnD c NK=8 OR lORSK 

<8*8>) THEN 490 

448 NEXT I 

450 POSITION 4j.11:' 7 " #b; , 'RwRONGii' li INPUTS" 

4S0 SOUND 8,208*1 8* 15S80SUB 700 

4?0 POSITION 4*11:? #£;" 

488 GU'iO 410 

490 BSKX Nk*2 >=2SIN f< < I-i V6 >+4 

500 ft3k< nk: , l >=2#< I -3*HSK< Nk. ,2 )+l 3 ) 

510 ftSK<NK*8)=I 

520 POSITION RSK<NK*l)*flSK<NK*2) 

530 ? #6,KEVPIC*<I*I? 

540 NEXT NK: RETURN 

599 REf'l check cards ?:;!.:?: 

eaa turn=turn+i 

6 1 K i =NSkA 8 * 8 >'• K2=flSK< l * ; 

628 IF KEVPIC*<K1*K1)<>KE*> J PIC*<K2*K2> TH 

EN SOUND 0* 100,10* 15: GOSuB ,'00: RETURN 

638 00nE=O0nE+1 

B48 KEV$ua*Ki ;■=" U :KEV$<K2*K2)=" " 



11 



658 SOUND 0,40, i 0,1 5 

660 bOSUB 7U0 

E.?a IF DQN£=9 THEN ? " Done in "iTURNi" 

turns !":SGUMJ 0,10,i0,i5:bOSU6 700: END 

680 RETURN 

699 REi'l wait &n 

?m FOR N=l TO 200: NEXT H 

710 SOUND 0,0,0,0 

?20 RETURN 

?'yy REi'i #&* main program %%% 

SO© SOSUB i 00: REf'i i n 1 1 i al i ze s 

810 bOSUB 300:REf'l display keys t 

920 8QSUB 400:REfl input and show % 

£G0 60SUB 600: REP) check Z 

940 GUTU 910 




12 



Las Vegas a Go Go 



Have you ever watched someone pumping coin after coin into a one-armed 
bandit, and found yourself wondering what the fascination was? You will soon 
find out when this program turns your computer into a fabulous Las Vegas- 
style fruit machine. All the playing instructions you need will appear on the 
screen. At certain points you will be presented with a list of options, for 
instance 

INSERT, HOLD, PLAY, OR END 

Enter your choice by typing the first letter of the option you want, for instance 
P keeps your machine playing. The reels are numbered 1, 2, and 3. If you want 
to hold one or more reels, type in the appropriate number or numbers after you 
have entered H. 

Lights will flash and music play as the wheels whiz around. Have you won 
this time? Never mind, you are sure to hit the jackpot sooner ... or later! 





13 



lti REi'i »*### Las vegas a 9090 ##### 
28 SETCOLOR 1 ,&,&i SETCOLOR 2,7,16 
38 SETCOLOR 4, 12,4: POKE 82,8: PUKE 752,1 
48 OPEN #2,4,8, "K: " 
58 GOTO 2988 

99 R£['i ### initialize ### 
188 REIi ## screen ## 
1 18 DL=PEEK< 568 )+256*PEEK< 561 )+3 
128 POKE DL,71:P0KE DL+3,6:P0KE UL+4,7 
138 POKE UL+5,6:P0KE UL+25,/ 
148 ? "<ESC><SHIFTXCLEflR>e* las vegas ; 
9090 *&<ESC>t=J<ESOE=3" 



158 ? 


" 




IMG 


GtJJ" 


168 ? 


H 




CHJG 


GtJ3" 


178 ? 
J" 

188 ? 


U 




CHJetQ0UE3 


CQUUOBCJ 


» 




CHJG G:EV3 1 


2ILV3 GCVjI 


era 


GLJJI 


gojg" 






188 ? 


" 




g mGtuujGi: 


uujeccj 


erne" 






288 ? 


" 




G CHUG GtJ3 


CHJG GLJJl 


CHJif 


iiljj 


e g f" 






218 ? 

6 fi" 


H 




g e g g 


G G G G 


220 ? 


« 




ecvijecja LHje gcjj ch 


as etjj ti-aeo-ae o 


.• g« 




238 ? 


H 




ecjj 


CHJG G 


G" 










240 ? 

1-'" 






gljj 


LHJG g 


250 ? 


•• 




e 


G" 


268 <• 


" 




g 1 




278 ? 


■• 




S 1 


8" 


288 T 


" 




li' 1 




298 ? 


•i 




G 1 


2" 


388 ? 


•• 




& 1 


■"' 


318 ? 


H 




DOB 


GCJJ" 


328 T 


" 




G 


G" 



338 REf'l *# text-strings *# 

348 Did B*t40:),Rl*< 1 ),IN*< 1 ) 

350 DIf'l S1«10>,S2*<18),S3*<10> 

368 REP1 ## wheel figures & values ## 



14 



3?£1 Dili (4F$<13,^R<2,13^U<4),HU<;3> 
380 FOR 0=1 TO 13 
530 REHD KlS-Kl^Ra-WF^U^Rl* 
408 R<0,U>=0:R<l,U>=Rl:R<;2,U>=fi2 
410 NEXT U 

420 DHlH H,0,0,K,0,0,G,0,0,d,0,k1,#,8,40 

430 DATA *.8,40,*,?,30,i:,:i,5,25,i:;:il,3,28 
440 DPJft E.J,3,20,CP3,2,10,ESJ,2,10,e,0, 



450 REfi ♦# gamble pos. i, values ## 

460 Din GP<4,1>,6U<4> 

4?0 FOR 1=1 TO 4: READ R1,R2 

480 6P< I,0>=R1:6P< 1,1 >=R2 

490 NEXT I 

500 DHTP, 33,3,35, 5, 33, ?,30,5 

510 REf1 ## holds, nohold ## 

520 OKI HF*<3),NH*<1):HF*=" ":NH*="e 8 

II 

530 REIT ## jokers ## 

540 DID JP<4>,JF*<4>,JCi;4; 

550 FOR J0=1 TO 4:JC<;JO;>=0 

560 REHO Rl,Rl*:JP<;JO>=Rl:JF*<:j0>=Rl* 

570 NEXT J0:NJ=4 

580 DHTH l5,a,i6,K,20,q,2l,j 






590 REIT ff# jackpot, ## 

800 Dili JBK 13 ) 

810 FOR 0=1 TO 13:JH<U>=0:nEXT 

820 jmS^lzJT-Ke^l: JfK7>=l 

830 REIT ## points ## 

640 POSITION 1,1:? "CREDIT :0"; 

650 POSITION 1,1 i:? " — 6 — = 1"; 



15 



668 FOR U=12 TO 5 STEP -1 

670 ? s? " -*iHF$<U,U)it*'$<U,U)i"- = ";R 

< i»y?i 

b88 POSITION 23,24-U:? HF*<U,U>jWF:r<U,U> 
iWF$< U,U>#" = "#R<2j.W)i 
690 IF .JH£.U> THEN ? "+J"; 
?m NEST U 
718 RETURN 

793 REfl ### wait ### 
888 FOR NW=i TO W:NEXT WW: RETURN 
839 REfl ### 9et input, print s3$ ### 
300 FOR W=8 TO 40 STEP 2 
318 SOUND 0»W#i0»UOL 

928 IF PEEK<784X>255 THEN GET #2, IN: IN* 
=CHR*< IN):P0SI I ION X,V:? S3**: SOUND 0*0* 
8,0! M=33i NEXT W:POP : RETURN 
930 NEXT W: RETURN 
399 REfl #»# blinK s-l*ys2* and get 
input and end with s3 ### 

1000 POSITION X,V:? Sl*i!60SUB 300 

1018 POSITION X,¥:? S2*;:60SUB 388 

1028 SOTO 1800 

1839 REIT ### add increment to money ### 

1108 FOR HD=S6N(IN> TO IN STEP SGN(IN) 

1110 SOUND 8,32l8-38.*SGN< IN>-2*flO,lS#i5 

1120 POSITION S,l:? i'iO+HD; 

1138 IF i'IO+HD<100 THEN ? " "j 

1148 FOR W=l TO S: SOUND 1,88-5*W,18,10 

1158 NEXT W: SOUND 1,8,8,8 

11S8 NEXT flD:f10=riO+IN: SOUND 8,8,8,8 

1178 RETURN 

U93 REI1 #«# remove double ##» 

1288 00=0: POSITION 26,0:? " "; 

1218 FOR J0=1 TO 4:P0SITI0N JP<;JO),S 

1228 ? JF*<JQ#JO>#!JCXJO>=0 

1238 NEXT JO :NU=4: RETURN 

i239 REIT ### print b* at bottom ### 

1380 POSITION 0,21:? "<ESC><SHIFT><EfHCK 

1310 POSITION INT<10-LEN<EJ*)/2>.,21 

1328 ? B**: RETURN 

1393 REfl ### Jackpot ### 

16 



1480 JH=l:JC=15: POSITION 9,11:? "O" 

1410 FOR TI=1 TO 10:POSITION 20,1 

1420 r "fJHL::e "i 

1430 POSITION 24*1 

1440 FOR 0=1 TO JC:? "J"i 

1450 SOUND O*150-10*TI-2*C*10*15 

1460 NEXT C:N£XT TIs SOUND 0*0*0*0 

1470 RETURN 

1499 R£f1 ### adapt, variables «#* 

1500 LW=<; NOT He>*WI:WI=0 

1510 FOR H0=1 TO 3:HF*<H0*H0>=NH* 

1520 POSITION 12+3*H0»12S? NH*; 

1530 NEXT HO 

1540 IF DO THEN 1620 

1550 FOR J0=1 TO 4 

1560 IF JC(JO>=0 THEN 1610 

1570 JO. JO>=JC< J0)-1 

1580 IF JtXJO»0 THEN 1610 

1590 NJ=NU+1 





1600 POSITION JKJ0>*6!? JF*<JO*JO>, 
1610 NEXT J0:60T0 1630 
1620 DO0C-UIF DC=0 THEN 60SUB 1200 
1630 IF NOT JH THEN RETURN 
1640 JC=JC-l:SOUND 0*250*10*15 
1650 W=10:6OSUB 800 
1660 POSITION 00+24*1:? " "* 
1670 IF -JC=0 THEN Jfi=0:POSITIGN 20, U? ' 
'■*: POSITION 9*11:? ■' ",:RE!'I 4+1 sp. 
1660 SOUND 0*0*0*0: RETURN 
169S RE11 ### not, enough money ### 
1700 HB=l:60S06 1200 
1710 JH=0:POSITION 20,1:? * 
"*:REfi 19 spaces. 

17 



1728 B*=" INSERT OR END":60SUB 1388 

1738 S1$="INSERT < 1 >":S2*=»e INSERT < J )t" 

1748 S3*=" u :X=10:Y=l:UOL=15 

1758 GOSUB 1088: IP IN*="P" THEN 1758 

1760 RETURN 

1799 REl'l ### noid poss.ble *** 

1808 B*=" INSERT HOLD RLfiV END" 

1818 60SUB 1300:X=15:Y=12:UGL=4 

1820 Sl*="£ G<ESC>DOkESC>L*:ie (2<ESC>C*J 

<ESC>Oae G" = S2*= U H<ESC:>E*3<ESC>E*»<ESC 

>C#3<ESC>OOH" 

1830 FOR HO=l TO 3: I=3*H0~2 

1848 Sl*< 1 , 1 >=HF*< HO, HO >: NEXT HO 

1858 S3*=Sl*:SGS06 1088:HO=IN-48 

1868 IF HU<1 OR H0>3 THEN RETLIRN 

1878 NH=NH+l:lF HF*< HG,HO>=NH$ THEN HF** 

HO , HO :*= " SHS " : GOT 1 838 

1888 HF*<;HO,HO>=NH*:eOTO 1838 

1889 RECi ### no hold ### 
1980 B$=" INSERT , PLHV OR END" 
1910 60SUB 1380 

1928 Sl$="???":S2$= u fc , ?'7~<'G":S3$="G G" 

1938 X=l7:V=19:U0L=2:60SUB 1888 

1948 RETLIRN 

1 999 REi'l # what, to do id i th u» i nn i nas #&# 

2888 B*="":IF NOT HE THEN B*="HOLD H 

2818 B*<LEN<B$;>+I )="6WnBLE COLLECT" 

2828 60SUB 1388 

2838 S1*="T??":S2$="G???G":S3*="G S" 

2840 X=17:'t-19:U0L=2:60SUB 1080 

2050 RETLIRN 

<;899 REl'l «## spin gamble tuHeels ### 

2188 nT=NT+i:HD=8 

2118 FOR WD=1 TO 3: IF HF*(HO,HD J=NH$ THE 

N POSITION 18+4*WD,9:? " ";:NEXT HO 

2128 FOR WO=l TO 3 

2138 SOUND 0,183+24*HLM2,10 

2148 IF HF*<WD,t4DK:>NH* THEN HD=i:GOT0 2 

258 

iisw fi=int<;rncb; 8^*180+1 > 

2168 IF FK5 I HEN Uc WD J=F1:G0T0 2180 
2178 U< WD >=5+< F 1 >? .:■+< F I > 1 8 >+< F I > 1 3 >+< F 1 > 

18 



23 W F i >36 )+< F I >49 >-K F i >68 >+< F I >a ? > 

2180 FOR W=i TO 5*HD 

2130 IF W=WD THEN SOUND 1.0,0*0 

2208 FOR WS=WO TO 3 

2210 IF HF«HS#MS>=NH$ THEN l=iNK13*RND 

< O >+ 1 ) : F'OS I T I ON 1 6+4*NS , 9 : : " HF*< I , I ;> ; 

2220 NEXT MS: NEXT w: SOUND 1,100, 10, i5 

2230 POSITION 10+4*W0,3 

2240 ? WF«0<MD;,WHO)>J 

2250 NEXT WO: W=30: 60SUB 800 

2260 SOUND 0,0,0,0: SOUND 1,0,0,0 

22 ?0 RETURN 

22S9 REI'I ##» take care of jokers ### 

2300 J6=0 

2310 FOR WD=1 TO 3:U=U<;hD> 

2320 IF 0>4 THEN FU=U:60T0 23S0 

2330 0W=w0:o6=oG+i:IF JC<UJ»0 THEN 2360 

2340 POSITION JFx ','.:■, k:y " "; 

2350 OCX U >=20 : NU=NJ- 1 

2360 NEXT WD 

c'3?0 IF NOT DO THEN DO=<NJ=0)llF DO THE 

N DC-15! POSITION 26,0:? "double LHJT'i 

2380 RETURN 

2399 REi'l ### compute sb innings ##* 

2400 Hu=l3:0N JS SOTO 2430, 24 10, 24 rtj 
2410 if NOT ( OH WNO FU>1W> THEN HU=FU 
2420 GOTO 24?0 

2430 U< >=U< 3 > : U< 4 )=0< 1 > 

2440 IF jh AND U';.-«-i.K/U(Jw+i.J Then 24? 



2450 U( a ;>= 1 5 : W 4 J= 1 5 

2460 hu=o<. jw+ 1-2+1 gt. .jh+1 :>;\k oh-i ;■ ; ) 

24>-'0 FOR WD=1 CO 3:HU f ,WU.>='XWD.> 

2480 IF WHDX5 THEN HWHB>=HU 

2490 NEXT wO 

25O0 IF HO 1 ; 1 .j=HW 2 ;■ WNO HW2>=HW<3> Wnu 

jhxhv<2>> Then gosob 1400 

2510 FDR WD=1 10 3:Wl=MI+<H0<W0>=l3J 

2520 NEKi WDI If .JH I HEN Hi = lt1SWi 

2530 NS=<; HW 1 )=HU< 2 ) H< HOC 2 J=HO<; 3 > ): Wl=W 

I+R<NS»HU<2^; 

2540 IF 00 Then wl=wi+Hi 

19 



255W RETURN 

£593 REf'l ### gamble ### 
2600 N6=N6+1 : W=l : 6U< 1 }=2*WI : &X 2 >=« 
261B GU<3>=INT<3*WI-''2):GU<4)=INT<WI>'2) 
2620 B*="ST0P u s60SUB 1300 
2630 POSITION 10,1:? " e6fflieLEe u j 

2640 FOR LI =2 TO 8: POSIT ION 29,LI:? "6 
G";:NEXT LI: REN 10 inv-spaces. 
2650 R=R+l:IF R>4 THEN R=l 
2668 POSITION GP<R,0>,6P<.R,1>:? 6U<R);:S 
OUNO 0,8W+10*R,10,15 

2670 IF PEEK<764><>255 AND IN*<>"S" THEN 
GET #2 , I N : I N*=CHR*< I N ) 
2680 IF IN*<>"S" THEN 2700 
2690 W=<1+RNO<:0;>*W:6OSUB 880 
2700 IF W<200 THEN POSITION GP<R,0>,6P< R 
,!>:•? "g e";:6GT0 2650 

2710 FOR LI=2 TO 8:PGSITIGN 23,L1:? " 

U ;:NEXT LI:R01 10 spaces. 
272a POSITION 14#1S? " "i 

2730 SOUND 0,0,0,0 
2740 6W=6H+6U< R )-H 1 : W I =6U< R >: RETURN 

2799 REP! ### end of game ### 

2800 GRAPHICS 0:POKE 82,2 

2810 ? "<ESC>t=J<ESC><THe>ftflOUNT OF ITONE 
V : " 

2820 ? "<ESC>C=3<ESCXTHB>Put in 
";H1 
? "<ESC>C=3<LSCXTHb>Got back 

";l'IO/4 
? "<ESC>C=J<ESCXTH8>f1ax at one tim 
"if1IV4 
? "<ESC>t=3<ESC><THB>u>on by gamblin 

";6W/4 
? "<ESC>t=J<ESCXTHB>Nufflber of told 

"jNH 
? "<ESC>L=3<ESCXTH6>Nu«ber of gaab 

a $m 

? "<ESC>t=3<E££XTT-ie>Number of turn 
";NT 
2890 END 

2899 REH ##### main pro-am **#** 

2900 SQSUB 100:R£fl initialize # 

20 



2840 
e 

2850 
9 

2860 

■5 

2870 
le=. 

2880 



£310 GOSUB 1500: RBI adapt # 

2920 IF l"ID>ffi THEN WNflQ 

2930 OH 2*HB+<F1Q>1 >+l GOSUB 1708,1888,1? 

00,1900 

2940 POSITION 12,1:? " *i 
2958 CH=< IN*="I" >+2*< 1N*="P" >+3#< IN*="E" 
;i 

2960 ON OH GOTO 2970,3888,2888: GOTO 2928 
297a N I =N I + 1 : 1 N=4 : GOSUB 1 1 88 
29S0 IF flOX'in THEN CII'HIO 
2990 SOTO 2926 
3000 IN=-2:GGSUB 11 WW 
3810 GOSUB 2180: REPi spin wheels * 
302W GOSUB 2388: REM jokers # 
3030 GOSUB 24*30: REI'l Winnings # 
3040 HB=HO OR It0<2 
3058 IF HI>LH THEN 3118 
3060 IF NOT HO THEN 2918 
3870 POSITION 12,1:? "YOU LOST"; 
3090 SOUND 0,258,18,15 
3:890 14=38: GOSUB 888: SOUND 8,8,8,0 
3100 GOTO 2918 

3110 POSITION 12,1:? "HONs " i 
3120 POSITION 16,1 :? Wis 
3138 FOR DU=Wl+l TO 2 STEP -1 
3140 SOUND 0,DU,10,l5 
3158 (4=18: GOSUB S88 
3160 NEft'T DO 

3170 GOSOB 2088: KEPI 9et instruction # 
3180 CO=<IN*="H" AND NOT HB>+2¥< IN$="G" 
:'+3*< IN*="C" > 

3190 ON CH GOTO 29lW,321W,328e:60TO 3178 
3288 HB= 1 : I N=W I : GOSUB 1 1 88 : GOTO 29 1 8 
3218 GOSUB 2688:REi1 oaflible # 
3220 HD=-i:LI4=8:G0T0 3848 



21 



Parrot 



PARROT is a very simple competition game. Play it on a rainy day with a friend 
(especially after your friend has had a few beers!). 

At the start of the game, your computer impertinently asks you: 




22 



ARE YOU READY PARROT? 

Yes, he is calling you a parrot! Press any key and the computer immediately 
displays a letter. You must enter the same letter as fast as you can. Since you 
copy each letter, you really are a parrot! The game is repeated for about 10 
seconds, and then the computer shows your score. 

How good are you as a parrot? Have a competition with your friends and 
try to win the title of 'Super-Duper Parrot'. (My record is 19 — I teach 
parrots!) 



10 REF'l ###*#####«## parrot. ############ 

20 DIM Xf< 1 ) 

30 OPEN #2,4*8* "K! " 

40 DL=PEEK< S60 )+PEEK< 561 >*256 

50 POKE DL+1S,?:P0KE 0L+l6,?:PUKE 82*8 

6H ? "<£SC>C<3<ESC>C=3<ESC>C=3<ESC>C=3<e 

SC><TfiBXESe><TfiB> LHJfiCTj EUJ-J? "<ESC 

X The: X ESC >< TfiB>CF JGC J J & " 

?a ? "<ESCXTfi6X£SCXTAB> H lrjiI"' 

£:0 ■? if i"<ESC>E= : Il£'3re you reaau parrots 

" : ? "<£SC>t=3<£SCX TBBXESCX TOBXESCX T 

30 GET #2*x: ? "<£SCXSHIFTXBflCK SXESC.> 
[-3<ESC>C-3<ESCXSHIFTX6fiCK S> gthc 

parrots " ; 

100 POKE 13*0: POKE 28*0 

1 1 x'= I NT< 65+26*RND< .■'' ) 

120 POSITION 22*10:? CHR$< X+32 >* " "* 

130 FOR M=l TO 20:_NE;=<T w: SOUND 0*0*0*8 

140 IF PEEK<20)+25e*PEEK<19;>600 THEN 20 



150 IF PEEK<?64>=255 I HEN 140 
ISO GET #2*6!? CHR$<6>, 

l?0 IF SOX THEN SOUND 0*240#10*15:6OTO 

130 

180 OC+ls SOUND 0*20*10*15 

136 ? "<ESCXSHIFTXBfiCK S>"*: POSIT ION 2 

2, 10: GOTO 110 



23 



2W ? :? "<ESC>C=:KESC><TO6>Score : » id 
" in 10 iec. » 

21 8 FOR W=180 TO STEP -1 

220 SOUND 0,H,1h,i5:NLaT W: SOUND 0,8,8,0 

238 ? "<ESC>IXKESC><TBB>Do you want, to 

play ayain "; 

240 INPUT X*:IF X*<>"N" THEN RUN 
250 GRAPHICS 0SPOKE 82,8: END 



24 



Kentucky Derby 



Ladies and gentlemen, they are off! Red Arrow is off to a good start . . . 
Blondish Boy is giving his jockey some trouble . . . and there's the famous 
Spanish Lady, on the inside track. This is really first class excitement, and 
we've only just begun! Coming round the first bend . . . Mickey Finn has taken 
over the lead, hard-pressed by Speedy Gonzales . . . 

The Kentucky Derby is a horse-racing game. There are not as many horses 
in our Kentucky Derby as there are in the real race — in fact, there are only 
three — but they have to run 10 gruelling laps (with computer horse-racing 
anything is possible)! At the start of the game the odds are given for each 
horse. Now you can place your bets. As long as you have money you can bet 
again and again — these horses never get tired. 

After the RUN command we see: 

YOU HAVE 

HOW MUCH DO YOU BET ON HORSE 1 



HORSE 

ODDS 

BET 



1 2 3 

2 2 3 



(odds may vary from race to race). 

When you have run out of money, your computer cheekily tells you: 

YOU'RE LIVING ABOVE YOUR MEANS 

Immediately after you enter all your bets the screen displays the racetrack, with 
horses at the starting gates. The odds and bets are displayed in the lower part 

25 



of the screen. 



/ put my money on the bobtailed nag 
Somebody bet on the bay 



18 RBI ######## Kentucky Derby ######## 
20 01 n Ftt 3 > , Ut 3 >,X { , 3 > , 1 <-. 3 > 
30 Gil'i LX3;»,Pc3>#.U3>#S<3^ 
40 OPEN *2,4,M,"K" 
50 GOTO 1200 

99 Hbi'i »## initialize #»# 

1 00 Oi'i 1 N= i : Du= 1 : U(JPG=2 : XftHX= 19.5 
1 1 a ROUNDS= 1 : CR£D I T= 1 00 : XH= 1 

120 XH 1 =XPi-2 . 5 : XH2=XH-0 . 8 : XH3=XH+0 . 9 
130 REIORN 

199 REi'l #«# initialize k.orse-s ##* 

200 HINNER=0 
210 FOR K=l TO 3 

220 X( R >=8: R< k ;'=0: Dc k ;>=ti 
230 P< K ;>=< INK 5$RND< >+l V5 ) 
240 UC K >=Fx K >*OU+Ufl 1 N : T< K J=2*K 
250 NEXT K 
268 RETURN 

299 REl't ### make bets ### 

300 PTOi=0 

310 FOR 1=1 TO 3!P<I J=cy<i>-UF1INVDy!PT0 

T=PT0T+P«; I >:NExi i 

320 FOR K=l TO 3tKK)=INT<PT0r/'P<K>)shEX 

r K 

S3k) GRAPHICS 2+lb:SElC0LGH l,4,b 

340 SETCOLOR 2* l3*6s SETCOLOR 3,12,10 

350 POSITION 0,9 

360 ? #6;"iiH0RSE:t Q K SJ£" 

3?0 ? #6i"eODDS :£":? #S; "eBET se** 

390 POSITION 0,0 

390 ? tbi'TJJJ Kentucky derby CUT'.; 

400 ? *bi"f VOL) CHN BETC"; 

410 FOR 1=1 TO 3: POSITION 6+4*1,10:? *6; 

PC I X»! NEXT 1 

26 



428 POSITION 8*6 

430 ? #6'j"H0H I'lUCH DO VOU BET" 

440 ? #6i"0N HORSE ?"i 

450 FOR J=l TO 3: POSIT ION 0,3 

460 ? #6;" VOU HftOt "iCREOIl;"* 

4?0 r #6i" 

■' j : REj'l 36 spaces. 

480 L=@!l< d >=0s POSITION 9,7:? #6iJ; 

490 POSITION 13*?:? #6;" "; 

500 POSITION 13,7 

510 GET *2,X:IF X=i55 THEN 550 

520 X=X-48: IF X<0 OR X>10 THEN 510 

530 ? #6;CHR*<X+i6^i 

540 L=L+1= K J>=H J)Sa0+x:6OTG 510 

550 IF CREDIRKJ) THEN POSITION 2,4:? # 

6;"GV0lrRE LIUING HBOUE VOUR MEANS !g 

"sGOTO 430 

560 CREDrT=CREOIT-Ic;.J> 

570 POSITION 7+4*J-L,li:? #6iKJ>i 

560 NEXT J: RE I URN 

599 REM ### change character set- ### 

600 RESTORE :TuP=PEEK< 106 >-8 
610 POKE 204, TOP: POKE 206, 224 
620 (-OR X= 1536 TO 1555 

630 REHD Us POKE X,U 

640 NEXT X 

650 U=USR< 1536) 

660 OHTH 104,162,4,160,0,177,205,145 

670 OATH 203,200,208,249,230,206,230 

680 DhTh 204,202,208,242,96 

690 RflPlSEl =TGF'*256 

700 FOR 1=59 TO 63 

710 FOR X=Rfli'lSET+I*8 TO RftflSE 1+1*8+7 

720 REHU U:POKE X,U:NEXT x:NEXT I 

730 OHTH 4,7,7,132,124,124,68,130 

740 OHTH 4,7,12,60,255,206,64,96 

750 DHTH 4,7,6,60,60,38,68,129 

760 DHTH 60,60,62,126,126,127,255,255 

770 OATH 0,0,0,0,0,0,0,255 

780 POKE 756, TOP: RETURN 

799 REfl ### initialize screen #*♦ 



27 




800 POSITION 0*7s? ffbi" 

YOU HHUh ";CREuIT; ''$."; 
8i0 POSITION 0,1 
820 FOR K=l TO 3 

830 ? »6;tO": "i 

840 ? #6i u fiOlNNNI*WI#lha<ESC)C<fiWCK S>NNN 
NNNNNN]K!"j 

850 POSITION 2,KK>-1:? #6;R<(0 
660 POSITION X<K>,TCK>5? #6i*eC*je" 
8?0 NEXT K: RE TURN 

899 REiT ### horse race #»# 

900 FOR 0=1 TO 3: SOUND 0,0,0,0 
9i0 IF u< Gj ;■ THEN iiio 

920 POSITION X(Q),KQ) 

930 IF S<Q>=0 THEN ? ttei'VUNJe" 

940 IF SXQ) THhN ? #6i" " 

950 IF S';Ci>=i THEN S';u>=0:GOTO 1080 

960 X<Q)=X<Q>HKG> 

970 WQ )=U< GJ HUUP8*RND< O >*< UFKK > > 

980 IP S<Q;'=2 THEN T< Q>=KG!>+1:S<LQ^=0:GO 

TO 108a 

990 IF <XH1<X<0>) HND <K<QKXH3> THEN 10 

GO 

1008 IF X<QXXl'iHX THEN 1080 

28 



1 8 1 is ». i i! )=X< U! >-Xl¥ix : fit Q >=Rt Q >+ 1 

102a POSITION 2«T(Q)-i:? #6iFKQ>i 

103i3 IF RtGX ROUNDS THEN GOTO 10b'0_ 

1040 EKQ>=1«IF NINNER=0 THEN WlNNtK=Q 

1050 60 TO 1080 

1060 IF XCQXXH2 THEN St UJ=i:GOTu itrttw 

1070 S< Q >=2'- T< U }=T< L-! J-l 

1080 SOUND 0,240,10,15 

1090 POSITION fitSJ.KQ; 1 

1100 ? §6iCHR*<25i+S<Q)>* 

1110 NEXT Q 

1120 SOUND 0,0,0*0: RE I URN 

1199 REfi ####» mam program #*### 

1200 GOSUB 100:RfcJ'l initialize # 
12ltf GOSUB 200: REfi in it iai ize horses # 
1220 GOSUB 300: REfi make bets * 
1230 SOUND 0,20,10,15 

1240 GOSUB 600: REfi character set # 

1250 GOSUB 800: REfi initialize screen * 

1280 U0=< IX 1 >+U< 2 )+Ut 3 > )/3 

1270 GOSUB 900: REfi horse race * 

1290 IF Dti )+Dt2;'+D<3><3 THEN i260 

1 300 CRED I T=CRED I T+K W I NNEft «: 1 1 Hi NNER ) 

1310 POSITION 0,8 

1320 '? #6;"ehorse e";HlNNEfi;"e wins g" 

1330 IF CREDIT THEN SOUND 0,100, 10,15:PO 

R W=l TO 500: NEXT H: SOUND 0,0,0,0: GDI 1 

ilia 

l.'.40 ? #6:? #6; "YOU LOST HU_ VOufi NONE 

V ! ! "i 

1350 GOTO 1350 



29 



Rainbow Square Dance 

A two-dimensional cube? Impossible of course, but this game, played on the 
computer screen, is similar in many ways to Rubik's Cube. 

You will see 25 colored squares arranged at random on a 5 x 5 board. The 
rows of squares on the board are numbered like this: 



2 
3 
4 
5 



6 7 8 9 

That is, the horizontal rows are numbered 1 to 5 and the vertical rows 6, 7, 8, 
9, and 0. When you enter the number of a row, the squares in that row are 
moved one position. In a horizontal row the squares move to the right, and in a 
vertical row they move downwards. As a square disappears off one end of a 
row it reappears at the other end, like this 













\ 


_y 



in a horizontal row, or this 



30 



r 
c 
( 
c 





J 



in a vertical row. 

The object of all this? You must rearrange the squares to form five hori- 
zontal stripes of one color each. Sounds simple . . . but is it? 



18 REM ##### Rainbow square Dance ##### 
20 Din h<5,5;' 

38 OPEN #2,4,W, "K" 
46 GOTO BOO 

99 REP! ### initialize ### 

100 FOR 1=0 TO 4: READ fl 

110 FOR 0=0 TO 4:fi< I,.J.J=ft:NEXT J 

120 NEXT 1 

130 UHTH 3,35,163,0,131 

199 REP'I ### initialize screen ### 

200 GRAPHICS 1? 

210 ? #6i"i-:rairiboMJ square danceii •':•<• #6 



0" 



^i'W '■' #6;" 6 7 8 

230 FOR 1=1 TO 5 

240 POSITION 0,3*1+2: ? #b;I 

250 POSITION 18,3*1+2:? #6; li 

260 NEXT 1 

270 POSITION 0,20:? #6i" 6 

260 FOR 1=0 TO 4: FOR K=0 TO 2 

290 POSITION 2,4+3:?-:i+K 

300 FOR J=0 TO 4: FOR L=0 TO d 



#6 



9 a 



31 



3 i 8 ? #6 i CHR*< Ai I * J ) > J 

32a NEXT UNEXT J: HEX I KsNJEXT I 

338 RETURN 

399 REfi ### sh i ft row ### 

400 FOR 1=5 TO i STEP -1 
4iw HCFM )={\kH,L-\ ;• 

420 NEXT 1 

430 H<H,0.:'=H<H*5;' 

440 FOR K=8 TO 2 

450 POSITION 2,4+tW3+K 

460 FOR J=0 TO 4: FOR L=8 TO 2 

470 ? #6iCHR*<H<H#J>)» 

48W NEXT UNEXT J:NEXI Ks RETURN 

499 REfi ### shift column *«# 

508 FOR 1=5 TO 1 STEP -1 

5l8 H< 1,14 ;=FK I-i#rtiJ 

528 NEXT I 

530 FK8.»H;>=FK5#ft) 

540 FOR 1=0 TO 4: FOR K=8 TO 2 

558 POSITION 2+3*H J .4+I*3+K 




32 



560 FOR L=fct TO 2:? #6iCHR*tfK l*fl>^i!NEX1 

L 
570 NEXT K:n£XT I: RETURN 
b'00 REPI ft»lt # main program ### 
610 LEU=30 

620 SOSUB 180: REPI initialize # 
630 FOR; H=l TO LEU 
640 H= I N T< RNCK >*5 '.> 

650 UN INK 1+2*RND': 0>.J 605UB 400, 500 
660 NEXT W 
670 POSITION 0,23 
680 ? #6; "enter- row : "i 
690 POSH ION 11,23 
TOO GET #2,h:? ffbiCHRjc H.Ji:fi=H-4a 
710 IF HBS<H-4.5 j>=5 THEN 6?0 
7'20 IF H=0 THEN H=la 

730 IF H>5 THEN H=H-6:GGSuB 500: GOTO 670 
740 fl=H-i:60Sut: 400 
750 GOTO 670 



33 



Qui Vive 



To be 'on the qui vive' means to be alert and watchful. This game is called QUI 
VIVE because to play it successfully you must always be on the look out for 
winning situations. The rules are very simple but the program needed to imple- 
ment them is anything but. In fact, it presents quite a challenge to a games 
programmer. 

QUI VIVE was invented by Eugene de Wolf and is played on a square 5 x 
5 board. Each player has five checkers and must try to arrange them into one 
of seven symmetrical patterns. These are: 



a horizontal line, e.g. 



a vertical line, e.g. 



34 



a diagonal, e.g. 



I 

• — •- 

I 
a rectangular cross, e.g. ' • 



a skew cross, e.g. 



• • 






• • 



35 



a vertical wing, e.g. 



\ 



\ 



• • 



a horizontal wing, e.g. 



/\ 



• • 



/ 



V 



At the start of the game the board is empty and you and the computer take 
turns to place checkers on it. The positions on the board are labelled like this: 

36 



©1 2 3 4 5 

© 6 7 8 9 10 

© 11 12 13 14 15 

© 16 17 18 19 20 

© 21 22 23 24 25 

© © © ® © 

To place a checker at any particular position simply enter the appropriate 
coordinates: for instance for position 21 enter Al, for position 12, B3, etc. 
Your checkers are indicated by P and the computer's by C. 

If all ten checkers have been placed on the board and no one has won, the 
game continues, with you and the computer taking turns to move checkers to 
try and gain a winning position. To move one of your checkers you enter the 
coordinates first of its present position and then of the position to which you 
wish to move it. 

You must keep a look out for chances to make a winning pattern yourself, 
at the same time making sure that you are blocking any winning moves by the 
computer. 

The program is one of the most interesting in this book. It contains a list 
of not only all 42 possible winning patterns but also over 100 particularly 
strong situations from which a player has a chance of making either one of two 
winning patterns. During the game the computer monitors this list in the light 

37 



of the situation on the board and assesses what its best move is. 

We advise you to play this game on an ordinary checkerboard against one 
of your friends before you take on the computer. You will soon see what a 
superb game it is. 

10 h'hl'l »##### Q U i - g i v e ###### 

2a Dlfl SR41#4;>#SRX4iX,x$<;2?; 

38 Dlfl 0F\ ltf, ;, ,i J#DFF< 10?,6>*DFP( \%? > 

40 D I f'l Cd. 4 , 1 :> , B< 24 .:> , CDF ■; 30 .:■ , PDF 'c 30 ':■ 

M POKE 92,5:? 'KESC>t<CLEHR;a<E3c5l£=:]P 
please wait. £'< 

80 SOTO baa 

99 RSI ### compute points of CDF ■: romput 

er Double Figures) ### 

1 00 P 1 =C 6':. OFF< OF , a .j .:■ OR B< OFF X DF , 1 :■ :> ;■+■: & 

CDFF<DF#2J) Ok &CDFF<DF*3))) 

110 P=c. B< DFF< OF ,4 ;■ }+b\ OFFX DF ,5 > >+6< OFF': u 

f #e>> via 

120 IF PK2 UNO P=3 (HEN P=P1 +2: RETURN 
130 P=Pl+P: RETURN 

199 REM ### compute points ot' PDF (piaye 
r Double F i gures .:■ ### 

260 N6P 1 =0 : NbP2=a : NSC 1 =0 : NOC2=0 
2 10 D 1 =B< DF Ft DF ,&»: D2=B< DFF CDF,!;; 
220 IF Dl=l OR 02=1 THEN NOP 1=1 
230 IF Dl=ia OR 02=10 THEN NGCl=10 
240 Dl=£:< DFFi; DF*2 :> >:D2=B< DFF< OF ,3 ) ) 
250 IF Dl=l OR D2=l THEN N6P2=1 
260 IF 01=10 OR 02=10 THEN NGC2=10 
2?0 SV=B< DFF< DF ,4 ) HEK DFF< OF ,5 > >+B< DPFt. 
F*6>> 

280 F'=G0+NGP 1 +N0P2+N6C 1 +N6C2 
290 IF 60=30 HND (N3C1=@ OR N6C2=0) IHEN 
P=P-10 

300 IF GU=3 UNO t NOP 1=0 OR N6C2=0; THEN 
P=P-1 

310 RETURN 

399 RED ### determine strategic vaiue of 
move ### 

400 IF NCOF'=0 IHEN 490 
4 1 I1C=0 : Nl v iC=0 : BEST=a 

38 



438 

440 

CDF : 
450 

480 
4?0 
480 
RET 
490 
500 
510 
528 
530 
;.4ti 
550 

UNO 

560 
570 
599 
600 

t>10 

es '> 

620 
es f 
b.jy 
t;4y 
650 
960 
t>60 
b?y 
Say 
tay 



FOR CDF=0 rO NCOF-l 

DF=CDF< CDF >: 60SUB 1 m 

IF P>4 THEN PP=CP:PT=CT:BEST=1:CDF=N 
NEXT CDF: RETURN 

IF P=RC THEN NlTC=NlTC+l 
IF P>P1C THEN nC=P:NHC=l 
NEXT CDF 

IF flCiflP OR U1C=PIP HND NITC<Nl'IP) THEN 
URN 

IF NPOF=0 THEN 550 

IF 0=0 THEN PP=CP:PT=CT 

FuR_POF=0 TO NPDF-1 

DF=F'DF';PDF >:6QSUB 200 

IF P=4 THEN PDF=y:NEXT PDF: RETURN 

NEXT PDF 

IF I'IP=ITC HND NI'iP=Ni'IC HNO RND<0><0.5 

fl=l THEN RETURN 

I'iF-iTC : N[-1F'=N[TC : PP=CP : PT=C T : f+= 1 

RETURN 

REIT ##*## mam program ##### 

GQSUB 2600: REf) init-SF (Single FiQur 

6QSU8 3300: REIT init-DF < Double Figur 

SOSUfi 3500SRB1 com-DFF < Double FiQur 

leid-E- .) 

i_:i_:=y:pC=y 

;• "Do you mam, t,o begin *i: INPUT X* 

IF X*tl#l>="V" THEN 60SU8 1300: GOTO 

PP=12:60T0 956 

FOR 1=0 TO 4:CCc. 1,1 .:'=y:NEXT i 
60SUB 1800: REfl otuner-SF's * 

IF P=5 THEN ? -fvou uune<ESC>C23*860 




39 



TO Haw 

?m if hsfo-i then hosub i7e8:eosuB 14a 

&i{ "61 <Bine<ESC>t23 n !S0T0 1100 

70S ? "(■' Fly turn, please wait £■■' 

710 60SU8 2080! REf'i omner-DF's # 

728 GOSUB 2388: REFI interesting DF's # 

730 P=a : BF =0 : EF =24 : MP=0 : NFIF-8 

740 IF Ul'IO-1 THEN BF=UCl : EF=Of1 

750 CP=6F-1 

?6y CP=CP+i:IF CP>EF THEN 950 

778 IF B<CPX>0 THEN 348 

798 GOSUB 2400s REM find CDF # 

see if sko hnd h=i then 348 
810 B:CP>=i8 
820 IF CC=5 THEN 988 

838 GOSUB 488:REfT Strategic value # 

948 IF BEST THEN BEST =8: GOTO 950 
858 GOTO 938 
888 FOR CTI=8 TO 4 
878 IF CCCCTIjI > THEN 928 
998 CT=CC< CTI *8 >'B< CT >=8 
898 GOSUB 488: REF'I Strategic value # 

988 IF BEST THEN BEST=8:CTI=9:NEXT CTI: 6 
OTO 958 
318 BO::T::'=18 
928 NEXT CTI 
938 B< CF' >=8 
948 GOTO 768 

958 GOSUB 1400: REFI computer move # 

3S8 GOSUB 1588: REIi player move # 

978 GOTO 678 

1839 REFI ### again ? ### 
1188 : " "Do you want to pi ay again " -, 
1118 INPUT X?:IF K*="V" THEN FOR 1=8 TO 
24: B< I >=0: NEXT I : GOTO 638 
1120 END 

1139 REFI ### get input ### 
1208 INPUT >#:IF LENO«:X>2 THEN 1248 
1218 IF »(1 J 1X"H H OR X*<1,1I»"E" OR X* 
<2,2x"i" OR X*(2,2::'>"5" THEN 1248 
1 228 X=MSC< K$< 1 , 1 ) >-5S0fiL< K*< 2 , 2 :> :>-4& 
1238 RETURN 

40 




1240 ? 'KESOCZWong input try again "j 
1250 GOTO 120B 

1299 KEPI ff## sham board ### 

1300 FOR I=B TO 4:? 5-1 i 
1310 FOR J=0 TO 4:k=I*5+.J 
1320 IF BOO=0 THEN ? "E Q"i 
1330 IF Of. K.j=10 THEN ? "t'CTDf'i 
1340 IF BCK>=1 THEN ? "CTU"; 
1350 NEK f j:? :NEaT I 

1360 ? h <esc>i:-j<esc>c-3<esc>c-j<esc>i:*j 

4 ESC >m< ESC VUOK ESC >m< ESC >C*3< ESC >E*3 
<ESC>EOI am : eilUC" 

13?'0 ? "<£SC>C*3<ESC>E*3<ESC>C*3<ESC>C*3 
<ESC>C*3<ESC>CO<ESC>C*3Vou are: CTHKESC 
>E=3":? " HBCDE":? 

1380 RETURN 

1399 REI'l ### computer move »## 

1400 IF CC<5 THEN F'T=CC:CC=CC+l :6070 146 
11 

1410 t "I take up 

1420 &<P\ >=& 



'iCHR«65+PT-INT<PT 



41 



1430 FOR CT1=0 TO 4 

1440 IF CC<CTI,8>=PT THEN PT=CT1:CTJ=9 

1456 NEXT CTI 

1460 ? "I Put down : " *CHR« 65+PP-INK PP 

/5>*5>i5-INT<PP^5> 

1 470 &< PP >= 1 : CC< PT j. )=PP 

1480 60SUB 1300: RETURN 

1499 REH ### player move ### 

1500 IF PCs 5 THEN 1540 

1510 ? "Which checker do you take up "; 

1520 BQSU8 1200: PT=X 

1530 IF B<PT><>1 THEN ? "<ESOC23Not pos 

s.ible"iGOTQ 1510 

1540 ? "Where do you put your checker "; 

1550 eosue 1200: PP=X 

1560 IF B',PPK>0 THEN ? "<ESC>C23Not pos 

sible":60T0 154u 

1570 IF PC=5 THEN B<PT>=8 

15S0 IF PC<5 THEN PC=PC+1 

1590 B<PP)=1 

1600 60SUB 1300: RET URN 

1699 REP1 #### winning ### 

1 700 SF=WSF : GOSUB 2 1 00 : PP=OI'l 
1710 FOR CTI=0 TO 4-!CT=OKCTI#0) 
1720 FOR 1=0 TO 4 

1730 IF 9Fc.SF,0=CT THEN I =9: NEXT I: NEXT 

CTIS RETURN 
1740 NEXT' l:PT=CT 
1 750 C T I =9 : NEXT CT 1 s RE I URN 
1799 KEl'l ##» determine owner of" SF'S ### 
### ana obi i gator y move ( Ufl >### 
### and checker pending <iX.J### 
1900 Ul , l=-i:WSF=-l 
1810 FOR SF=0 TO 41 

1820 P=B< SFX SF,0 > >+&•; SF< SF, 1 ) >+B( SF< SF,2 
;■ >+Bt SF< SF , 3 > j+tK SFX SF , 4 > > 
1830 IF P=0 OR P=10 OR P=20 OR P=30 THEN 

SF UC SF >= 1 : NEX 1 SF : RE TURN 
1840 IF P=40 THEN WSF=SF:NEXT SF: RETURN 

1850 IF P>20 OR P<3 OR P=ll OR P=l2 THEN 
SF0< SF >=0 : NEXT SF : RETURN 
i860 SFO';SFj=1 



42 





ltv'kt IF P=4 AND Of'l=-l THEN 6QSUB 2100 

1880 IF P=14 THEN GOSUB 2200 

1880 IF P=5 THEN SF=99 

1980 NEXT SF: RETURN 

1939 REfl ### determine owner of OF's ### 

2000 NCDF =0 : NF'DF =8 

2010 FOR OF =8 TO 10? 

2020 01=SFO< DFi. OF #0 > >:02=SF0C DFX OF , 1 > ) 

2038 IF 01OG2 OR 01=8 OR 02=0 THEN DFF*< 

OF >=0i NEXT DF : RETURN 

2040 B0SUB 200:OFP';DF>=P 

2050 IF P=30 OR P=40 THEN CDF (. NCDF >=DF : N 

CDF=NCDF+ 1 : NEXT DF : RETURN 

2060 IF P=4 OR F-14 THEN PDF < NF'DF ,J=OF : NP 
DF =NPDF + 1 : NEXT DF : RETUFlN 
2070 NEXT DF: RETURN 

2099 REfl ### determine otl i gator '-i ### 
### move ton; ### 

2108 FUR 1=8 TO 4 

2110 IF B<SF<SF*I>>=0 THEN 0f1=SF<SF#I ): I 

=9 

2128 NEXT I: RETURN 
2 199 REfl »#ff determine pended ### 
### checker (CC) ##* 

2288 FOR 1=8 10 4 

2218 IF B<SF<SF*I>?=18 THEN F=I:I=9 
2228 NEXT 1 
2238 FOR J=0 TO CC-1 
2240 I F 9F'; SF,F j=CCf J»0 ) THEN CCC J, 1 j=l : 



43 



■j=y 

225a NEXT J: RETURN 

2299 REi'l detenu i ne i nt-erest i ng DF ' s ### 

230S IF NCDF>5 THEN RETURN 

2318 ]=20 

2320 FOR DF=0 TO 10? 

2338 IF DFP<DFX>I THEN NEXT OF: SOTO 23? 



2340 IF SFO<DF<DF*8>)=10 AND SFO< DF< DF , 1 
) >=10 THEN CDF< NCDF >=DF : NCOF=NCDF+l 

2350 IF NC0F=6 THEN DF=108:NEXT DF:RETUR 

N 

£.'360 NEXT DF 

2378 if 1=0 THEN RETURN 

2388 1=1-10 

2390 GOTO 2320 

2399 RET'i ### find CDF ### 

2408 IF OrlO-1 THEN SK=9: RETURN 

2420 IF NCDF=8 THEN 2478 

2438 FUR CDF =8 TO NCDF-l:DF=CDF';CDF> 

2440 FUR SK=8 TO 8 

2450 IF DFFc DFj.SK ;'=CP THEN 3K=9:CDF=NCUF 

:NEXT SKSNEXT CDF: RETURN 

2490 NEXT SKSNEXT CDF 

2478 IF NPDF=0 THEN SK=8: RETURN 

2490 FUR PDF=0 TO NF'DF-1 : DF=PDF< PDF > 

2508 FUR Sk=8 TO 6 

2518 IF DFFX DFj.SK J=CP THEN SK=3sPDF=NPDF 

2520 NEXT SKsNEXT PDF s RET URN 

2599 REi'l ff## initialize SF ### 

2608 FOR 1=8 ID 41 : REND X* 

2618 FUR J=l TO 5 

2628 SF (I j. J- 1 >=flSC< X ■$<■. J , J > >-65 

2638 NEXT J! NEXT I: RETURN 

2669 REi'l ### Winss i--u>< j ### 

2700 DNTfl UQI'iSV J .PLHNT J .K.6CiO 

£710 DhTh H6i'HE J .FLRN.J,Ki:JNSO 

2728 DfliN ftGHGUj.BHNRUXIOSW 

2730 Dffi'H EII''!8t,DHlRXj.CGk:uW 

2739 REl'l ### times <X) ### 

2800 DHTH HCGKTi,BOHLN,CEir'IO 

2818 DfiTfi FHLPR J .GIf'lttS J .HUNRT 

44 



2920 DATA KriQUW,LNRUX,F'"IOSMV 
2899 RBI ### Plus '; +: ' *** 

2388 DATA BFHriL,r:6Hii'!,DHl.JN 
2910 DftTfl 6KLflQ J HLF'iHR,II'lN0S 
2920 DATA LPQRU , f'lQRSW , NRS I X 

2999 RED ### diagonals (v) ### 

3000 DflTH HSI'lS¥*EiriQU 

3039 REM ### columns ( I ) *## 

3100 DATA flFKPU,B6LQU*CH1RH 

3110 DATA DINSX,EJOTV 

3139 REI1 ### rows <-> ##* 

3200 DATA ABCDEj.FGHI.-Ua.f'ING 

3210 DATA PQRST#UUHXV 

3293 RBI ### initialize DF ### 

3300 FOR 1=0 TO 10? STEP 1 2: READ X* 

3310 FOR J=0 TO ll:FOR K=0 TO 1 

3320 L=2*J+K+1 

3330 DFC I+.J^K )=ASC< X*< Lj.L ) >-43 

3340 NEXT K:NEXT .J : NEXT 1: RETURN 

3333 REP1 ### double figures ### 

3400 DATA l?l: lHlCiEll'H01P2>2£2B2J 

3410 DATA 3Jd3<3=:3?3S4?4:4=4?4H4640 

3420 DATA 4Ff .£5ES05.JS3e< eceE6IV=?A 

3430 DATA 71271 707P8>8B8D8J9?9E9K!? 

3440 DATA : A:E:K:0:Pj;>i£;Di.J<=<C<I 

3450 DATA =G=I=G>F>H>J?6?K?P£F£J£L 

3460 DATA AiSAIAK.AriAOAPBHBJBNCICPlCP 

3470 DATA OJCiLDNEKEriEGFRFWeSGWHTHW 

3480 DATA IRIXJSJXKTKXLRLVnSflYNTNV 

3493 RBI ##* compute DFF ### 

3500 FOR 1=0 TO 24= B< I >=«: NEXT I 

3510 FOR DF=0 TO 107:CF=4:NCF=0 

3528 FOR 1=0 TO 45B<3F<DF<OF#8>#I>>=l!NE 

XT I 

3530 FOR 1=0 TO 4:SF=SF< DF< DF,1 >,I ) 

3540 IF B<SF> THEN DFF<DF,CF ;'=SF:CF=CF+1 

!B<SF)=0!NEXT I: GOTO 3568 

3550 DFR DF , NCF >=SF : NCF=NCF + 1 : NEXT 1 

3560 FOR 1=0 TO 4 : SF^SFC OF < OF ,0 )# I ) 

3570 IF BKSF) THEN OFF-: DF ,NCF:j=SF:NCF=NC 

F+l:B<SF J=0 

3530 NEXT I: NEXT OF: RETURN 

45 



STM 



The nature of memory is certainly one of the most interesting topics in psychol- 
ogy. To remember something has been defined as 'to show in present responses 
some signs of earlier learned responses.' Why, though, do we remember some 
things and forget others? We may recognize someone we haven't seen in years, 
or call to mind a tune having heard only a few notes of it, but find it very 
difficult to remember, for instance, a telephone number. There are in fact two 
distinct types of memory: short term memory (STM) and long term memory 
(LTM). If you want to find out more about this intriguing topic we recommend 
that you read 'Introduction to Psychology' by Hilgard & Atkinson. 

This game tests your short term memory. Play it with your friends and 
family and see who can remember most. You will see this 'menu' on the screen: 




46 



DO YOU WANT TO PLAY WITH 

1. LETTERS? 

2. NUMBERS? 

3. OR 1 ONLY? 

4. OR DO YOU WANT TO STOP? 

Now you make your choice by entering 1 , 2, 3 or 4. Say you entered 1 to play 
with letters. A letter will now appear on the screen but only for a very short 
time. You have to enter that letter. The computer will then show you two 
letters which you have to enter, then three, and so on. Obviously, as the 
number of letters increases, remembering them all becomes more difficult. 
What is the longest string of characters you can remember? Can you beat our 
record of eight? 



10 Rti'l ############ S f I'i #*######*##* 
£0 DIP! Bs<20>#A$<28;> 



30 GKHPHiUb 8 




40 ? •'<hSC>L=_kESC>- 


:. rflB>0o you want to 


iay wit-h" 




50 ; "<£SfJ>L=KfcSC> 


:.Thb.h. Letters ?■■ 


60 Y "<£SC>t=3KESC> 


. ihb>2. Nunit-ers ?" 


7% '■:' "<hSC>L=-ktSC>- 


;TfiB>3. w OR l only 



80 ? "<tSb>C=J<tSCKIHB>4. CM" «3 you wan 

t. to stop \" 

90 ? "<tSC>L=J<bSCXlHB>"i:iNFUr ft 

100 UN ft GOTO 1 10* 128. 1 30*350! GOTO 90 

110 ft=2b:B=b5:GGi'U 140 

120 H=10: 6=48: GOTO 140 

130 H=2:6=4b 

140 GRftPHiLS 2:P0Kh 13,o:PUKL 20,0 

1j0 ? #6;" **^?S s t, iti x**S*:" 

ibO 0=1 

170 ft*="" 

1«0 FOR 0=1 IOC 

1 90 6$=CHKSC INK B+KNOt X*R > .:■ 



47 



200 POSITION 1H,4:? #6;BS; 

210 H*( LEH-; h* >+ 1 >=B* 

220 FOR M=l TO 100: NEXT w 

230 POSITION 10,4:? *b;" "j 

240 NEXT D 

2b0 Y "Answer :•';: INPUT b$ 

260 IF B*=fl* THEN C=C+i:6OT0 1?U 

270 POSH ION 0,4 

280 ? #6; "wrong " 



290 ? #6; "IT HHS 
300 ? #6; "SCORE 
310 ? #6i"Tll"E 



"iH* 

"iC-1 

" ; INK <; PEEK-; la ;#2b6+P 
EEk< 20 > VO . S v i 00 i " SEC . " 
320 ? "Oo you want to play again '';:INPU 

3Jk) IF fl$="Y" THEN 140 

340 RON 

350 GRAPHICS 0:END 



48 



One to Five 



This exasperating game, which we saw first on a CASIO calculator, takes quite 
some logical reasoning to solve. It is played on a board with nine positions set 
out like this: 



1 2 3 
4 5 6 
7 8 9 



A horizontal and a vertical line drawn through any one position will cross five 
positions in all. For instance lines drawn through position 4 will also cross 
positions 1, 5, 6, and 7. 



1 

4 

7 


2 


3 


5 


6 


8 


9 



49 



The positions on the board are occupied by a random pattern of digits between 
and 5. If you enter one of the positions (using the key shown on the screen) 
the digit on that position, and all the digits on the horizontal and vertical lines 
going through that position, are increased by 1 (except 5 which becomes 0). For 
instance if we had 



1 



1 5 4 

and entered 4, the board would change to 

3 2 4 



2 5 4 

The puzzle is solved when the board looks like this: 











50 



10 RBI **###**## One To Five ###*###*# 
20 U I f'l I Lf< 9>, &<■. 2 , 2 .:> , I N»t 1 > 

38 OPEN #2,4*0.. "K.! " 
40 GRAPHICS IS 

50 IL$= u euNEf-)SD2XC£'' 
68 FOR R=0 TO 2: FOR C=0 TO 2 
70 6<;R,C;>=0:n£XT C:NEXT ft 
80 GOTO 600 

39 REM ### screen #*# 

100 ? #6i"*' one to five #■' 

110 ? #b;" •" + + VibOSuB 200 

120 '? #6j" + h + t-":bOSUB 200 

130 ? #6;" + y + H":bOSU6 20W 

140 '?■ #6i" \ + + — — '•' 

150 FOR R=0 TO 2: FOR C=0 TO 2 

160 POSITION 3+5*C2+3*R 

170 ? #b;Iusc3*R-HJ+l,3*R+C+l>; 

1S0 NEXT C:N£XT_R 

190 GOSUB 500: RETURN 

200 '?■ #6; " ! ! ! ! " 

210 '?' *6;" I ! ! ! " 

220 RETURN 

299 REfl ##* 9et instruction ### 

300 6ET #2, IN: IN*=CHR*< In+128) 
310 FOR 1N=1 TO 9 

320 IF IN*=Il*<INj.In;' THEN RETURN 
330 NEXT IN:GOl'0 300 

399 REfi ##* execute move #*# 

400 R=INTO; iN-1 ;>/3>:C:=lN-3*R-l 
410 BCR,C;>=B<LR,C)-1 

42:0 FOR 1=0 TO 2 

430 BtR,I )=B<K,I >+l 

44W IF B<R*l)=b THEN B<R,1>=0 

450 fiU^O^U.O+l 

460 IF EKI.tONS THEN EKI#C>=0 

470 NEXT I: RETURN 

499 REfl #** output board ##» 

500 NZ=0_ 

510 FOR K=0 TO 2: FOR C=0 TO 2 
520 POSITION 5+5*C,3+3*fi 
530 ? #6jCHR*(B<:ft*C;>-4y+64;>j 

51 



548 


NZ=NZ-K B< R , C >=W J 




558 


NEXT C:NEXT R: RETURN 




599 


KEfi ##### main program ##### 




600 


FOR 11=1 TO 9 




610 


I N= I N 1 < STOCK >+ 1 ) 




6£@ 


GOSUB 408: REM execute move 


* 


630 


NEXT TJ 




640 


GOSUB 100SREI1 -screen 


# 


650 


GOSUB 388:REi'i get instruction 


# 


660 


GOSUB 408:REi'i execute move 


* 


670 


Nfi=NI'l+l 




680 


GOSUB 500:REPI output boar a 


* 


690 


IF N2<9 THEN 658 




700 
fi I'i'iC 


POSITION 8,lls? #6i"Sdone in 


e'jNFii 


718 


GOTO ?ia 





52 



Escher 



The work of the Dutch graphic artist M.C. Escher (1902- 1972), based as it is 
on symmetry and mathematical forms, appeals particularly to computer 
programmers. 

Now with the help of the computer you can produce your own patterns 
based on the same principles used by Escher. 

Consider the following pattern: 




?St5 




It is based on a mosaic in the Alhambra palace in Spain. If you look closely 
you can see that all the tiles are the same shape and that they are arranged so 
that the 'inverse video' of the white tiles shows the same pattern rotated 

53 



through 90 degrees. Escher studied such patterns and invented a game based on 
them. He devised a patterned tile such as 



N> 



and arranged to form a continuous pattern. 



S> 



</ 



<> 



which he rotated through four positions 



<y 



JUUUL 




o — <>^-^o — s> 




-^^^<^ -o 







\> 



r^r 



54 



This program does something very similar. After you have filled a 'basic' 
square with a pattern the computer rotates and shifts it to fill the screen with 
your own 'Escher'. 

First the computer asks for the graphic mode: 

Graphic modes: 

1. very LOW resolution 

2. LOW resolution 

3. HIGH resolution 

4. very HIGH resolution 

and you enter your choice, for instance 2. 

The the computer asks you to enter the size of your basic square, which 
you then have to fill, row by row, with colored pixels. The size of the pixels 
depends on the resolution you have chosen. Each key of the keyboard repre- 
sents one colored pixel. You can delete the last entered pixel with the backspace 
key. 

After you have filled your basic square the computer asks: 

Enter length of board (max . . . .):? 
and 

Enter width of board (max . . . .):? 

Now you fill the board with basic squares by pressing the N, W, E or S-key. 
These keys indicate the direction of each basic square, as it is displayed on the 
screen. (N = north, W = west, E = east, S = south). If you want to change the 
dimensions of the board, press the START key! 



55 



10 REfi »#### Escher yame ##### 
2a DIfi Kit, 1 ) 
30 open #2j4*0j"Ks " 
40 SOTO S@8 

yy REfi ##* initialize ### 
100 GRAPHICS 

110 ? HESC>L=J<hSCX IHB>E S C H E h 8 
fl PI £" 

120 7; XESC>L=J<ESC>L=J<ESCXTHS>6raphic 
■=• modes : •' 

138 ? XESC>L=J<£SC.kThB>1. very LOU res 
oiuti on" 

140 ? "<ESC>£=J<E8CX ThB>2. LUH resoluti 
on" 

150 ? "<ESC>L=J<ESC.kThB>3. HIGH resolut 
i on" 

160 ? "<ESC>L=J<ESCXTHB>4. very HIGH re 
solution" 

170 ? XESC>L=KESCXTHB>Hhici.-, mode do y 
ou want- : n -, 

180 INPUT flu: IF fiu=i THEN 200 
130 FOR 1=5 TO WIG : READ X:NEXT I 
200 READ PlOsREftD HCJREfiD FIR: READ OF 
210 ? :? "<ESCXTAS>Enter ■=■ ize of t-as ic" 
220 ? "< ESC X TAB > square (max U ;1NT<(P1R+1 
>/2)i") :'i 
23a INPUT SI 

240 IF SKi OR S1XP1K+1 )/2 ["HEN 210 
250 D I PI S£K SI-1 j.SI-1 > 
260 DATA 3, 40,2U,4, 5, 80, 46,2 
270 DATA 7,160,95,1., 8,320,13i,l 
230 RETURN 

233 REfi ### initialize screen #*# 
300 DL=PEEK< 560 H256#PEEK< 561 >+3 
310 POKE DL, 70: POKE DL+3,6 
320 FlEi'i Define your own colors ! 
330 SETCOLOR 0,2,8 
340 SETCOLOR 1,12,10 
350 SETCOLOR 2,3,4 
360 SETCOLOR 3,4,6 
370 SETCOLOR 4,0,0 
380 RETURN 

56 



399 REfl ### input basic square »## 

400 RESTORE 

410 KhHU !'iO0:RbHLi NCsREfiD NRsRENO OPh 

420 IF SIXNR+1V2 THEN 410 

430 SC=< NC-SI >/25SR=< Nfi-SI ~>/2. 

440 GRAPHICS MQG+16SGGSUB 300 

450 FOR R=B TO SI-i:RP=F:+SR+OFF 

460 POKE 8?* is POSITION 0*0 

470 ? #6 i ''enter data for basic square ,ro 

m "jsR+ii" "; 

460 POKE 87,fiOD 

490 FOR C=W TO SI-i:CP=C+SC:COL=l 

500 COLOR 2¥C0l:Pl01 CP..RP 

510 FOR M=l 10 25 

520 IF PEEK<?64X>255 THEN 540 

533 NEXT h:C0L= NOT COL: GOTO 500 

540 GET #2,X:x=/=;+208:IF XOS34 THEN 580 

550 COLOR 0SPLOT CPj>RP!C=C— 2 

560 IF C'<-1 I HEN R=R-i:RP=RP-i:C=SI-2 

570 NEXT C 

580 StK R , C >=X : COLOR X : F'LO T CP , RP 

590 NEXT CsNEXl R: RETURN 

599 REfl #«# dratt esc her picture *?t# 

600 ? "<E6C>L<CLEflR>J<ESC>lL=JEnter Iengt 
h of board (max "; 

610 ? INR flOSI >i " ) :"i!lNPU? lE 

620 IF Lt<l OR L£>flC.''SI THEN 600 

630 ? " Enter i.i.i i dt-h o t board ( max " i 

640 ? INI'- nR.-'bl :>i" ? : ';: INPUT Hi 

650 IF Hl<l OR Hl>fiR.-'SI THEN 630 

660 SC=( fiC-SISLE ;'--'2: Sfi=< f 1R-SI*Hi >'2 

670 GRAPHICS i'iO+lb:GOSUB 300 

680 POKE 87*2 

690 "? #6i''fiCi-kJ3G ile s c h e r@ ©CJjje" 

700 ? ffbi" dram with rCLJ'.t'LLJelLUlsO-a" 

f'lU POKE 87*110 

720 FOR R0=0F+8R TO <HI-1 .:'*Si+GF+bR STEP 
bi 

7ja FOR C0=aC f'u ( lE-i ;i;sSi+8c STEP Sl 

?4w IF PEEKi. 53.l7h )=b [HEN 600 
750 IF PEEK 1 :. 764 >=255 THEN 740 

760 GET #2,k:K*=ChR¥^x:':X=0 

57 



770 X=< X$= " N " )+2U X$= " E ■' >+3U X*= " S " )+4U 

Xs="H" > 

78« IF NOT X IHLN 740 

730 FOR R=a TO SI-UFOR C=0 TO SI-l 

see color sotR*o 

810 UN X 60SUB 660,870,880,830 

820 NEXT C:NtXT R:NEXT CO: NEXT Ru 

83a POKE 87,1: POSIT ION 0,1 

840 ? #6i"GEJ3e fid r a w i n 96 eEJJtG" 

850 RETURN 

860 PLOT CO+CRO+R: RETURN :REI'I <ESOC-3 

870 PLOT CO+SI-l-R,RO+C: RETURN :REf'l <ESC 

880 PLOT CG+SI-l-CRG+SI-l-R: RETURN :RO - l 
<£SC>£=3 

880 PLOT CO+R,RQ+SI-l-C: RETURN :RtJT <ESC 

yyy REi'i *#### mam program ##♦## 

9 WW 60SUB 1 0W : Khi'i initialize * 

910 GOSUb 400:REl'l input basic square # 

920 GOSUB 600: REi'i draw esc her picture # 

930 IF PEEiU 53279 X>6 THEN 33a 

340 POKE 764,255: GOTO 32a 



58 



Genius at Work 



Play this simple game to find out how good you are at thinking mathemat- 
ically. After you have entered the number of players, the computer displays 
seven numbers and a larger 'target' number and asks 

OPERATION? 

You must pick two of the numbers and one of the four simple mathematical 
functions: 

addition + 
subtraction — 
multiplication x 
division / 

For instance, if you enter 7 + 18, the computer asks: 

Is this your final result? 

If you enter N, the computer calculates 7+18 = 25 and replaces the number 7 
and 18 in the initial list by 25. Now you choose again. Your task is to get a 
final result as near to the target number as you can. 

The character of this game is simplicity, so the whole family can play. 
When one player has finished their go, press any key to start again. Now you 
can find out if there is a genius in your family! 



la Kfcl'l #»####«# Htm us Ht wor-K ######## 
20 Dil'l 0', ? s,F$< 10 ,',£4\ 1 ) 
38 T=0:x=0:k=0 



59 




60 



4U 60 i o y@w 

yy REi'i ##* random numbers ##* 

100 FOR 1=1 TO ? 

1 10 Oc 1 >=INT< itf*RND( a ;+i ^ 

12tf iF IMK0X0.25 THEN DtI^=lNT<4Xf{H£K8 

;>+l >3i:5 

130 NEXT 1 

140 F=lNT< C 9*:RND«, >+i >$100 > 

150 RETURN 

199 REf'l #»# display #*# 

200 ? "<ESC>lL<CL£HR>3^ESC>t=3iry to apro 
ach this number: "iF 

210 •? "<ESC>L=3vou have got these number 

s:<ESC>IXr 

220 FOR 1=1 TO ? 

230 IF DCiX>0 THEN ? EKlJi" "J 

240 NEXT I 

250 '?' 

260 RETURN 

239 REfi #*# input operation ##* 

300 '?' "<.ESC>L=3Ent,er operation ";: INPUT 

F* 

310 FOR N=l TO LEr<KF$) 

320 E=flSCC F*C N > ) 

330 IF C 41<E> HND CE<48]> THEN (4=yHLCP$<; 1 

,N-l > >: B=UftLC F*C N+l ,I_EN<> F* >> >: RETURN 

340 NEX T N 
350 60T0 300 

399 REf'l ### compute new numbers ### 

400 FOR d=l TO ? 

410 IF LK J >=H_THEN DC J >=0:GOTO 430 

420 NEXT J:60T0 460 

430 FOR 1=1 TO ? 

440 IF UCI>=B TFiENON E r 4i 60SU6 500*510 

,0,520*0*530: UhlF=lk I >:RE1 URN 

450 NEXT I:D<LJ>=H 

4F;0 ? "<;ESC>C2a<ESC>L2JI":X=0:POP :6QT0 8 

10 

500 OC I )=H*6: RETURN 
510 DC 1 ->=I4+B: RETURN 
520 DC I ;=*+-&■: RETURN 
530 DC I J=INK IV6 >: RETURN 

61 



599 REf'l ### compLrte points ### 

600 ? "<ESC>lL=3Is this your final result 



bie 


INPUT 2s 


620 


IF 2$<>'"t"' 1 HEN POP :GOlO 810 


630 


? :? "Voli have: ";UftLFi" on " if- 


640 


X=5-HBS< F-UflU- > 


65*1 


IF X<0 THEN X=0 


660 


IF X=5 THEN ? *<ESC>t=JMELL DONE!" 


670 


T='l+X:R=R+1 


680 


? *<ESC)C !S 3ThiS makes "iXj" points" 


690 


?• "<.ESC>L=3Noui you have "i'i'i" points 



?00 ?• " m ''iRj" rounds* 

710 ? "<ESOt=JHn aver-aye of " jINKT*108 

/R,v'100j" points per round" 

720 ? "<ESC>lL=JH9ain "j: INPUT 2$ 

730 IF 2*="V" THEN POP S60TO 800 

740 RETURN 

799 REfl ##### mam program ##» 

800 GOSUB 100:REI'! random numbers # 
810 GOSuB 200: REf'l display # 
620 GOSUB 300:REfi input operation # 
830 GOSUB 400: REf'l compute new numbers # 
840 GOSUB 600: REf'l compute poims # 
850 ? "<ESC>L<CL£hR>:T':END 



62 



Shark Hunt 



For five days now you have been adrift in your boat searching the seven seas. 
Suddenly you see a slight ripple on the mirror-like surface of the ocean — there 
it is, your quarry, that terror of the deep — the shark. Move your boat using 
the cursor keys or the joystick. Your echo-sounder will tell you how close you 
are to the shark — the nearer you get the higher the note it gives. Stray too far 
from the shark and you are told 

SORRY; YOU WENT TOO FAR 

When you think you are close enough you can take a shot at the shark by 
pressing the space bar or pressing the red button on your joystick. If you hit 
the target you will see the message 

THAT'S IT! CONGRATULATIONS! 

Unfortunately you only have 200 ergs of energy to use. Moving your boat and 
firing your gun both cost energy. If you use up all your energy the computer 
tells you 




63 



YOU RAN OUT OF ENERGY 

At the end of the game you will be given information on your performance as a 
shark hunter. 

10 Rfci'i ff#ff### 3 h a r k h u n t ##*### 

2y Dii'i CO$<&l>*R$(i jj!*3;,V$<iiJ 

30 OUT rtX3*8.»*STIK<8*l ) 

40 OPEN #2,4,0, "K.: " 

5a POKE ?52*1 

68 60 JO 1508 

93 KEi'i ### initial i2e ##* 

100 Cuz—" 'sorry, you tuent too far fiTha 

t's it. i ijonyraT.ijiaT.. ionsi&You ran out, of 

energy 

118 X*="l r":v?="u d" 

120 FOR Tu=0 TO 2: FOR NO=0 10 ? 

130 RENO R: TLkTLi,nu>=R 

140 NEXT NO: NEXT To 

150 OflTH 204,133,204,133,284,210,284 

160 DflTfi 133,83, 125* 147* 176* 193*204 

1/0 DfiTfl 218,218,24,21,18,1-5,12,3*6,3 

168 FOR 1=0 TO 3 

1 30 REHD X , V : 3 i 1 KX I , 8 >=X : 3 T 1 K< 1 , 1 >=V 

200 NEXT 1 

218 OhTP 3*3*3*— 3*3*0*0*0*— 3*3 

220 DfiTH -3,-3,-3,0,0,0,0,3,8,-3 

230 RETURN 

233 REIT ### initialize one game ### 

300 N6=N6+1 

310 SX=iN T< ,''0SRND< 8 > >-35 

328 SV= I NT < 70#RND< > >-35 

330 D1=h8S<6X:j+h8S<SV> 

.340 fjD=D 1 : 30=0 1 : SH=8 : H 1 =0 : NS=8 

358 EN=208 : UX=0 : UV=0 

360 RETURN 

398 REIT ##* screen ### 

400 ? "<esc>i:<j<esl:>ii:=j" 

410 ? " £ ... 8 

8 S H ft H K HUNT £* 

64 



415 ? "S £" 

420 ? "<ESC>£=:i<ESCXTOB>ftsourrt. of energ 

y: "i£Hi" eras" 

43E1 POSITION 2*17 

441.1 v "(love t>u using the cursor keys or< 

ESC > iim X ESCX TAB X ESC >< TOE >< ESC X TfiB> 

the joystick" 
4^.0 "■• "Shoot b'-i pressing the space bar o 
r< ESCX TOB X ESC X TOB X ESC X TOB X ESC X TOB 
> the red button" 

468 POSITION 16 j. 13 

478 ? " D i r ec t i on * i 

488 POSITION 2,22 

490 ? "press <eSTT4RT£> r -,o start game"; 

508 IF PEEK 1 ; 53279 X >6 THEN 588 

518 PUSH ION 2 #22:? "< ESCX SHIP IX BHCK S 

XESCXSHIFTX INSERT;" ; 

528 Kb TURN 

593 REIT ##* input speed ### 

688 UX=8:UV=8 

618 IF PEEKC 764 )=255 THEN 678 

628 6ET #2* IN 




65 



638 Ma=3*< < IN=42 )-< 1 1-4=43 > > 

640 W=3*< < IN=S1 >-; iN=45 > ) 

650 SH=< IN=32) 

660 RETURN 

670 IN=STICK<0>:IF INOIS THEN UX=ST1K< I 

N-5,8 ): Uv=STT K< In-5, l j 

688 SH= NOT STRI6<8> 

690 RETURN 

699 Rtl'l ### compute ari-t-ance et,c. #«atL_ 

700 IF NOT SH THEN 750 
7 1 NS=NS+ 1 : EN=EN-2£D I 

720 IF EN<=0 THEN EN=0: RETURN 

730 HI=<DI*RNO<0><=1 > 

750 SX=SX-UXJ SV=SV-W 

760 EN=€N-< UX< >0 >-< UV< >0 >- 1 

770 IF EN<=0 THEN EN=0: RETURN 

780 SX=SX+SGN< SX >: SV=SV+SGN< SV > 

790 01 =WBS< SX )+flBS< SV > 

800 IF DKI'IO THEN 00=01 

810 RETURN 

899 REI't ### output ### 

980 POSITION 20,9:? "£ e<ESOC=3<ESC><C+ 

TKESOt+JG: ik Q. y<ESC>C=J<ESC>C+3<ESC>C+3 

e e"» 

9 1 F'OS III ON 20+S6N< UX > * 1 

920 ? X$< SGN< UX >+2 , SSN< UX )+2 > ; 

330 POSITION 28,18+SGN<UV) 

940 Y V$< SGN< UV >+2 , SGN< U V >+2 > ; 

958 IF SH THEN GOSUB 1080 

960 SOUND 0,01,18,15 

970 14= 188: GOSUB 11 88 

988 POSITION 25,6:? EN;" ergs "; 

998 RETURN 

999 RED ### shoot *## 

1008 FOR 1=220 TO 250 STEP 5 
1010 SOUND l,I,10,15:w=2:GOSOB 1188 
1828 SOUND 1 ,8,8,8= W=5:G0SUB 1188 
1838 NEXT I: RETURN 

1099 REI't ### Mil ### 

1100 FOR WH=1 TO N:NEXT WW: RETURN 

1199 REI'I ### ena of this game ### 

1 200 ? " < ESC X SH I F T >< ClEWR X ESC >t= J " ; CO* 



( 27*Cfl+l *2?*< Ch+1 ) )i"<ESC>C=Q" 

1216 FOR NO=0 TO ? 

1228 SOUND 0#TtKCB..NG)*18#t5 

1230 W=25:60SUB 1100 

12+0 NEXT NO: SOUND 0*0*0*0 

i25w i : "Stating distance : ";SO 

, " m. " 

12S0 ? "Number of snots : ";Nb 

1278 v "Vou approached with in : ",|'1D 

;" (»> 

1200 II- HI CHEN ? "Vou hit it from 

: ",D1*" m. •■ 
1290 Rt=50-Dl.-'2 

1308 IF Hi THEN RE=5€H£N/4+SD/10 
1310 RE=IN"RRE> 
1320 JF RE<0 (HEN Rt=8 
1330 IF RE > 10O THEN RE=10ti 
1340 TR=TR+RE 
1350 IF RE.X'lR THEN ITR=RE 
1360 ? "<ESC>C=JRe<i)ards, on a scale of l 
0y: " 

i3?0 ? "This game : "*RE 

1380 ? "Average over ";Nb*" games : 

"iiNKTR/NG) 
1330 ? "flax i mum : "jl'IR 

1400 RE I URN 
1 49a Ktl'i ##### «a i ri program ####* 

1500 BOBuB i0a:REri initialize * 

1510 SOSUB 300:REi'l initialize i oame # 

1520 BOSOB 40y:Rt!'l screen # 

1530 GOSUB b00:Khl'i input, # 

1540 BOSUB i ; '00:REfi computing # 

1^50 60SUB 900:RErt output ff 

1 5B0 CH=3SX EN=0 >+2:£H I -K 1 > 1 00 >- 1 

1570 if CPK0 THEN 1530 

15B0 B03UB 1 £00: POKE ?S4*255 

1590 ■•' "<ESC>C=Jflnother game ? ";:Gtf »2 

,In 

it;u0 ii- iN=ys ihen i&iw 

lblO '( "<£SC>L<CL£flR>J"stNO 



67 



Shakespearian Shuffle 

Shakespeare, one of the world's greatest writers, and chess, the king of games, 
are combined in this unusual puzzle. 

Letters are arranged on a chessboard like this: 



T 







B 


E 







R 


N 





T 




T 







B 


E 




T 


H 


A 


T 




1 


S 




T 


H 


E 




Q 


U 


E 


s 


T 


1 





N 


. 




W 


1 


L 


L 


1 


A 


M 




S 


H 


A 


K 


E 


S 


P 


E 


A 


R 


E 




1 


6 





3 



A chesspiece, the knight, then moves around the board as it would in a normal 
game of chess. As it jumps from one square to another, the letters or symbols 
on the squares are exchanged. In this way the text on the board is jumbled up. 
The computer will ask you 

LEVEL? 



and you enter the number of moves you want the knight to make. Obviously, 

68 



the higher this number the more mixed up the board becomes. 

You will be shown the board after the knight has made his moves. Your 
task is to unscramble the text by moving the knight back around the board. 
Enter a number between 1 and 8 to move the knight, as shown. 





1 




2 




8 








3 






* 






7 








4 




6 




5 





la Kbfi ft##ff* Shakespearian shutfle ##### 
20 Dlfl H?«7 J,HV< ? >,H$(. £*},&$<■ t&>AW. l :> 
30 OPEN #2 J .4,8,"K: " 
40 GOTO 500 

99 fiti'i ### initialize #*# 

100 X0=i:VO=l 

110 REHD Bj:HS=e* 

120 FOR K=0 TO ? 

1 30 REfiO B*8! H>'.<-. K >=H : HV< K >=B 

140 NEXT K 
150 RETURN 

199 REi'i #*# knight's move ### 

200 XS=H>X IT ? : VS=HV< IT > 

210 IF KS+X0>8 OR XS+X0'<1 OR VS+V0>8 OR 
VS+VlKl THEN n=lNKRNO';0 )*8>:60T0 288 
220 XN=XO+KS: VN=VO+VS 
238 RETURN 

299 REi'l ### Change letters ### 

300 P=X'N+< VN-1 )%&: U=XO+c VO-i ;..tS 

3 1 W$=8^; P ,P >: B$*. P , P .)=£:*■; <J , g .:■ : B&, U , u >=H 
* 



69 



328 POSITION l+XO,l+VO 

338 ? #6»B*<<V0-1 )*8+X0#<; YG-i mm+ku) 

348 POSITION 1+XN,1+VN:? *6j"f.; 

358 XU=x;N:VO=VN 

36a RETURN 

399 REI'I #*# display ### 

40a POSITION O,0: ? #B;"shaKespeare shutt 

Le ";:? #6 

410 FOR K=l TO 8 

420 ? #6j" "je?<CK-l JSy+l,K»i:^ 

430 NEXT K 

440 POSITION 15,3:? #6;"8 1" 

45W POSITION 14,4:? #6i"? 2" 

460 POSITION 16,5:? #6i"£#e" 

470 POSITION 14,6:? #6; "6 3" 

480 POSITION IS,?!? #6;"5 4" 

490 RETURN 

499 REI'I ##*## mam program ##### 

580 ? "<ESC>C<CLEHR>3<ESi::>L=J<ESi::>t=JEriT. 

er level : u j: INPUT L 

510 GRAPHICS IS 

520 60SUB 188:REIT initialize # 

530 GGSUe 400: REI'I di-spiay # 

540 FOR K=l TO L 

550 n=INT<RNO<0>*8> 

560 60SUB 280: REI'I knight's move # 

578 GOSUB 380:REf'i change letters # 

580 NEXT K 

590 POSIT I UN 0,11:? #6; "enter move : 

u - 
r 

608 POSITION 12,ll:GET #2,l'l:? #6iCHR*<rt; 

:n=n-4y:IF PK8 OR l'l>, ; ' THEN 59U 

618 60SUB 280:REfl knight's move # 

620 SOSUB 388: REI'I change letters # 

630 IF «*OB* THEN 590 

648 POSITION 8,8:? #6; "congratulations! 

650 POSITION 8,18:? #8;"£do 'you want wj 

play agamy ? ■■ -, 

660 GET #2,li:lF f'l=S9 THEN RUN 

670 END 

680 DhTH U'to be ornot to fc«tLJ that is t 



70 




he quest, i onQOU! i i -i- ' a m ShaK espe-are C&UPS J 

e 

-1,-1,-2 



71 



Explosion 



Most computer versions of EXPLOSION set out the board for two or more 
opponents to play on. With this program you are pitted against the computer 
itself. Are you up to the challenge? 

EXPLOSION is played on a board of 3 x 3 or 4 x 4 squares. The 
computer will ask you to enter the size of the board you want. 

Each square on the board has a capacity equal to the number of squares 
directly adjoining it. This means that corner corner squares have a capacity of 2 




edge squares have a capacity of 3 




72 



and central squares have a capacity of 4. 




You and the computer have checkers, of opposite colors, that you place on 
the board in turn. You may place a checker on any empty square, or on any 
square which already has one or more of your own checkers on it. A square 
will 'explode' when the number of checkers it carries reaches its capacity. An 
exploding square empties, its checkers spreading out, one to each neighboring 
square. These checkers will 'take over' any opposing checkers on these squares. 

As the game progresses the explosions get bigger and bigger. Eventually 
the whole board will explode in one color. If it's your color you've won! 



la fttn ##»## Explosion ##»#» 

20 1 1'l RB< 5 , .-i .i r 'ciK 5 #5;, Si < t> , 5 ) r HNS 1 ; 1 

30 OPEN #2*4#8*"K! " 

4gi GOTO 1300 

93 RErl #ff# copy SB w> Kb ### 

100 FOR ? : ;=1 70 Si: FOR v=l TO SI 

1 1 SBC X r V .5=KB< X > V > 

120 NEXT V8NEXT XsRETURN 

199 REl'l ### copy R6 to SB 99* 

200 FOR X=l TO Sis FOR v=l 10 SI 
2 1 RB( X * V >=SB< X#V ) 

220 NEXT V:NEXT X: RETURN 

299 REl'l ### add to neighbours- ### 

380 SB< EX,EV >=PL#< Hb'Sf. SB'; EX,EV ) )+l ;■ 



73 



3i a if di find sixexjEV) then ggsob 700 

320 RETURN 

399 REl'i »»# execute explosion ### 

480 SBC X j. V )=$&(. X , V >+PL 

410 NE=8 

420 EX=X:EV=V:IF 01 THEN SOSUB 788 

438 XF-8 

448 FOR X=l TO SI: FOR V=l TO SI 

460 IF fiBS<SBtX#V>KST<X.V) THEN 568 

470 XP=1:NE=NE+1 

490 IF DI THEN 60SUB 808 

500 SEw; X , V >=SB< X , V >-ST< X * V >*PL 

518 EX=X:EV=V:IF Di THEN 60S0B ?08 

528 EX=X:EV=V+1:60SUB 380 

538 EX=X+1:EY=V:G0SUB 308 

548 EX=X:EY=V-l: SOSUB 388 

558 EX=X-l:EV=V: GGSUB 380 

568 NEXT V:NEXT X 

578 ET=<NE>SI*SI> 

588 IF XP HNO NOT ET (HEN 438 

598 RETURN 

599 REM ##* evaluate situation ### 
888 EN=8 

818 FOR X=l TO SI: FOR y=l TO SI 

628 EN=£N+SEK X#V > 

838 IF -SB<X,V><ST<X J .V>-1 THEN 688 

648 EN=EN-2 

658 EN=£N+l8*< < SBC X+l Vt' >=ST< X+l #V >-l >+<, S 

Be X, V+l >=ST< X.V+l >-l >K SB< X-l »V >=ST< X-l , 

V >-l >+< SBC X#V-1 >=ST< XVt'-I )-l > > 

668 NEXT V:nEXT X 

678 RETURN 

899 REfT ### output one value ##w 

780 POSITION 3+3*EX#2+2*EV 

710 ? #6*CMR*<feS<SB<EX*EV)>+48+<S+2*PLJ 

*32$< SBC EX , E V X >0 .» ;■ 

728 RETURN 

799 REN ##* output explosion ### 

888 SE:=SBC X , V > : EX=X : E V= V 

810 FOR 1=15 TO 1 STEP -1 

820 SOUND 8,88*8,1 



74 




&30 i£<x,Y>=-ie:c-.-usue 7m 

840 FOR H=l TO 8: NEXT W 

650 S6<XA'.)=S6:GGSUB 700 

868 FOR W=l TO 5: NEXT H 

8?0 NEXT i: SOUND 0,0,0,0 

88W RETURN 

839 KEPI ### player's move ### 

900 POSITION 0*11:? #b;"VUUR TORN x: r t» •, 

910 6ET #2,nX:i'IX=lNRflX;>-48 

920 IF flXO OR f'IX>Sl THEN 910 

930 POSITION 10,1 IS? #b;"y; 

940 GET #2,nV:l'lV=INTaiV>-48 

950 IF I1V<1 OR C1V>SI THEN 940 

960 IF R8<riX,nVX0 THEN 900 

9?0 POSITION 0*1 15? Via* "i 

980 60SUB 100:REI'I Sfa -> re # 

990 X=l'IX:V=f1V:DI=l 

1000 bOSoB 400! REO execute explosion # 



1010 IF ET THEN 1600: REP) end 
1020 60SUB 200:REl1 rb -> sb 
1030 RETURN 

1099 REPI #*# computer's move ### 

1100 6E=1000 

1110 FOR TX=0 TO SI: FOR TV=0 TO SI 
1120 IF RB<TX,TV>>0 THEN 1190 
1130 60SUB l00:REf1 sb -> rb 
1140 X=TX:V=TV:DI=0 



* 



75 



158 SOSUB 480: REH execute explosion # 
168 IF ET THEN fTX=TX:ITV=TY:60Tu 1200 
170 60SUB 600s REM evaluate situation # 
180 IF EH<BE OR EN=BE HMD RNEK0X6.4 TH 

EN BE=EN:fl>;=TX:flV=TV 

198 NEXT TV: NEXT TX 

20W SOSUB 180: REH st> -> rb # 

218 X=l'iX: V=l v iv:Dl=l 

228 GOSUB 400: RET) execute explosion # 

238 IF ET THEN 1688: REIT end # 

248 GOSUB 288: REIT rb -> Sb # 

258 RETURN 

299 REM ### mam program #»# 

388 GOSUB 1488: REiT initialise # 

318 IF CiT THEN i33w 

328 PL=i: GOSUB 980: REIT player -s move # 

338 PL=-i: GOSUB 11 88: REIT comp's move # 

348 NT=N'I'+1 

358 GOTO 1328 

399 REIT ### initialize ### 

488 ? ■ , <ESC>L<CLEOR>J<ESOC=JEnter size 

of board (3 or 4) "j 

418 1NPOT SIsSI=lNT<SlJ 

428 IF SK3 OR SI>4 THEN 1488 

438 FOR X=8 TO 5: FOR V=8 TO 5 

448 RB< X r V >=8 : SB 1 ; X , V ^=8 : ST( X * V >=8 

458 NEXT VsNEXT X 

468 FOR X=l TO Si: FOR V=l TO 91 

478 STt XVV >=4-< K=l>-<. X=SI >-< V=l )-< V=SI > 

468 NEXT V:N£XT X 

498 ? "<ESC>£=J|!irt - '0 starts <you or me.) " 

588 INPUT fiNT:Cf'l=<fiN*="V" .■' 

518 GRAPHICS 18 

520 ? #6i"i-CJ.J-J3 explosion tjjjjg" 

530 POSITION 5,2:? #6; "XI x2 X3"; 

540 IF SI =4 THEN ? #6;" X4"i 

550 FOR V=l TO SI 

568 ? #6:? #6:? #6*" V"iV; 

570 FOR X=l TO 61:? #6;" " iR&<- XA'>; 

568 NEXT XSNEXT V 

598 RETURN 

76 



1589 REl'l ffffff end #*# 

168@ POSITION 8,1 

1610 ? #6; "an eternal expiosionresultecC 

LJ SO '■; 

1620 IF Pl=1 ihln ? #8;"eyouG *i!60TO 

1 640 

163a 1 K&i'&td " ; 

1640 ? ff6;" have won in ";nj;" turns", 

1650 6010 1650 



77 



New York, New York 

This original and exciting game puts you in a helicopter high over New York, 
looking down on the city's streets. At the moment they are deserted, but soon 
traffic will appear, and it's up to you to keep it moving. You do this by 
controlling the city's traffic lights. When a car (represented by a square) 
reaches a red light it will stop. Each traffic light bears a symbol — pressing the 
key bearing that symbol changes the light to green and the car will continue on 
its journey. 

At the start of the game enter a level of difficulty, after which you will see 
the streets and cars. The game proceeds in rounds, during each of which the 
cars move 'one step'. 

You start with 200 points. You gain 40 points for every car that gets right 
across the city. However, if two cars collide at a crossroads you lose 200 points, 




78 



and every time a car has to stop at a traffic light you lose 10 points. If you run 
out of points the game ends — if not it lasts 200 rounds. The more points you 
get, the better traffic cop you are! 



It! Rfc.nl #*#### New yot-K, Metu Vor-K ###### 
28 U i f! Cfit 4 >*LH< 4^Li! 4 ) 

$4 Li i i'l CfK 8 > , 8F% & > , y: 8 .:■ , b< 8 > , LUX 8 .3 

40 Dif'l UJ< IK J,KIC 1 J 

be Din D«2>jpS«26>#l*<3>j 

by upen #6, a, a, 1 '::;: " 

78 GO f 1 Ohm 

hh KEl'i ### initialize ### 

lOti FUR 0=1 TO 4sR£f£i LisuK'f. U j=u:n£? : ;T C 

113 Lift Tfl 234 j. 24b , 438 j. 426 

120 FOk l=o TO JsKEftD F'CLK L ;'=i'i:NEX I L 

130 UHlT-f 32j.37j.13Jj.i20 

i4t, FOk C=i mj y:REHU Ds SR C >=Di NEXT C 

ISO LiHlH 8,2Oj.SO2j.4y0j. Ib0j.352j. lbSj.350 

188 FOR 01=1 TO , : ' STEP 'd 

l?& REHU Uj.LO 

i km u( c i j=o j u< c i + 1 . :,=I -' 
i00 lu< oi .)=lu:loc ui+i ; ,= lu 

yyy NEXl 01 

218 UHiH 32,-1 j.-32 j 2 j 2j.33j.-2j.-32 

228 e$='*e Lvj Lvjt'tvjo etvje lacuuuujGCuiu 

LIU M " 

230 D$="(i' lij" 

240 o$='' a y a '-'" 

i:sO L$=" y 

iOO '•" ■' : ;£Su>L<CLEHR>J : ;E8L:>L=JL.evei Cl-3) 

■■ -, : i NPU i LE 

iV'8 LE=iNKLh.) 

xwy if LtU OR LE>3 IHEN 00 ro 268 

280 LE=lb-4KL£ 

J00 PU=20W 

JlO FOR 8=1 TO y-'-S'.. 6.j=8:neki B 

320 FOR 0=1 TO 4!|_N< G.:=0:nE; :: ; I S 

338 RETURN 

388 REI'I ##» screen ### 

79 



SSSNEXT F 


::? LS:'f 


• L* 


SSSNEXT R 


::r L$S"? 


LS 


S*:nEXT F 






'"£!" 






■ "W" 






. »£« 







400 GRAPHICS 8: POKE 752*1! POSITION 11*1 

W2 <■ "New vorK, New vork:;ESC.;t=3<ESC;L= 

K£SC;C=J" 

410 FOR R=0 TU J:? 

426 FOR R=0 TO J:? 

430 FOR R=0 TO 3:? 

440 POSITION 9,?:? 

450 POSITION 30 w': 

460 POSITION 9*18! 

470 POSITION 30 j. IS:? "S" 

480 FOR C=l TO 4:l=0:SOSOB 578 

490 POSITION 1+V,E:? "££'136" 

500 FOR L=l TO 3:G0S0B 570 

510 POSITION l+V,E:? "LIT 

520 NEXT I_:NEX( C 

530 POS I T I ON 5*3: ? ■' po i nts : " 

540 POSITION 25*3!? "Rounds:" 

550 POSITION 7,22:? "LIGTHS: Red = ££ T J£ 

, Green = Oil" 

S6K) RETURN 

5 70 X=CR<; C ;h-L K L .:■:£= I N T ■; X/32 ) 

580 P=32+E:V=X-P 

590 RETURN 

699 REi'i ### car ari ves ### 

700 H=I MT< LE*RND< B>> 

718 IF S<6^=0 HNLi HOl I HEN RETURN 

72(1 IF S<;C>=0 hnD 0=1 ThEn Ch<C>=SP<C>!R 

tl'i new car 

738 IF S<Cx>3 HND S<CX>9 THEN SOTO 760 

74ti x=4+CH i ; C HlXK C >-32SlNT ( ( Cfi(. C J+LOt C > ') 

/32 > : V=5+ 1 N (X < CN< C >+L0< C > V32 > : POS I T I ON 

X,Y:6E1 #6*S"! POSITION X*V:PUT #6*S 

750 IF 6=148 THEN PU=PU-10! SOUND 0*80*10 

* 15: FOR N=l TO 20: NEXT RESOUND 8,8*0,8: R 

ETURN 

768 POSI fiON 4+CfKC>-32*INT<C0<CV32>*S+ 

I NT< CfK C V32 >: '? 0* 

770 CH< C>=Ch< C 3+w C > 

780 S<C>=S<;C>+1 

c'90 IF S<C>=15 THEN S< C;=0:PO=PU+40:FOR 

H=88 TO 38 STEP -i:SOOND 8,H, 18, 15: NEXT 

H: SOONO 8,8,8,8: RETURN 



80 



Hi-iM ;:<=4+r:Hc C >-32#INKCft<CV32>!V=5+INT<; C 
PK C >.<"32 ) : POS I T ION X , V : 6E T #6,6: Put: IT 1UN 
«,V:PUI #S,S! POSITION X*V 

tao if s=ibu then ? c$< 2*0-1 *2*cj! return 

820 SOUND 0,100,0, 15:F0fi H=l TO 200SNEXT 

h j sound 0,0,0,0 
930 PU=PU-208 
840 S< C J=6 
950 RETURN 

ESS RETT ### change ligths ### 
yaa CR=< K=4? >+£*■; k=46 >+3:?x K=82 ;>+4SX K=S3 .> 
910 IF CR=0 THEN RETURN 
328 SOSUB 970:? "t'H" 
930 LN< l:R.3=LNc.CR>+1 
940 IF LN<CR>=4 THEN LN<. CR.J=0 
950 GQSUB 970:? "61706* 
960 RETURN 

970 POS I T i ON 1 +CR< CR J+L I ■: LN< CR > J-32* I NT< 
< CR< CR >+Ll< LN< CR > > V32 .J* I NT ( < CR< CR HLK L 
Ht. CR > > V32 j 
390 RETURN 

999 REl'T *#### mam prograai ##### 

1000 BOSU6 100: RETT initialize # 
1010 B0SU8 400:R£fi screen # 
1020 FUR C^l TO 8 

1WJ0 SOSUB 700:REf'l car drives # 
1040 K=PEEK< 764 >: POKE 764,255 
1050 IF K<>255 THEN UUSUB 900: RETT change 
1 1 crwvs 

1060 NEXT C 

1070 NR=NR+1 

1090 if PLK0 THEN PU=0 

1090 POSITION 13,3:? Pu;" 

1100 POSITION 33*3!? Nft 

1110 IF PU>0 AND NR<200 THEN SOTO 1020 

1120 POSITION 5,22: POKE 752*0 

1130 r "<ESCXSHIFTXBftCK SXESOC2IKESC 

:Km6xESCXTft6>unce again ";: INPUT K$ 

1140 iF k:*="V" THEN RUN 
1150 END 



81 



Key 



Searching for a key you have lost can be an aggravating experience at the best 
of times, but when you have to find it as quickly as possible and, what's more, 
it's hidden inside a computer the whole thing becomes very exasperating, but 
also very challenging. 

The computer has stored inside it a string of 20 ones and zeroes. 

I I 00 I I I I 1010101 10 

These figures can be shifted cyclically, that is, digits are moved from the 
lefthand end to the right. This is done three times and the numbers in each 
column added, for instance 

row I — > 00 10101 I 1010101 10101 

row 2 -> I I I 1 I I I I I 00 I 1 
row3->OIOOIOIOI I I 010 10 I 101 



sums -» 022 I 2 I 222230303 I I 303 

This is all kept hidden from you: it is in fact the key you must find. 

What you are shown are the three rows of numbers, each shifted again. 
For instance if the top row is shifted two positions, the middle row four 
positions and the bottom row eight positions you will see 



10 101 I 10 10101 1010 100 

I I I I I I 00 I I I I I 

1 I 1010101 I I I 00 I I 



20000 1 12 I I I I 2331 01 22 

82 



You are not shown the sum of the new columns but the difference for each 
column, between this sum and the first 'hidden' sum. In the first column, for 
instance, the hidden sum was and the new sum is 2 so you see 2; in the second 
column the hidden sum was 2 and so is the new sum so you see 0. You must 
now shift the three rows until they are the same as the hidden key, when, of 
course, all the differences will be 0. The rows are numbered (the top row is 1, 
the middle 2 and the bottom 3) so that if you enter 

ROW = 2 
STEPS =1 

the middle row will shift one position to the left. 

How few turns will it take you to find the key? It has been done in as few 
as 10. 




83 



1 Pi RFi'l iHt-lUHHH H UHHUrit k e <J iriHHHUHHHHHHHfr 

20 Difi T<4,»;a8)»fl$<28) 

36 GRAPHICS 2 
40 GOTO 600 

99 REfl ### initialize ### 

100 ? #6;" *## key *»:" 
110 ? #6; "TURN : ";NT 

120 (&=" 1010010101 11010101 10" 

130 GGSUB 200: REfl randomize rows # 

140 FOR K=l TO 20 

150 T< 4*K >=T< 1 ,K >+K 2,K >+T< 3,K > 

160 NEXT K 

170 GGSUB 200: REfl randomize routs # 

180 RETURN 

199 REfl *## randomize rouis »## 

200 FOR J=l TO 3 

210 R=INT<;RND<0)*19+1 > 

220 FOR K=l TO 20 

230 OIS=K+R 

240 IF DIS>20 THEN DIS=DIS-20 

250 T< J*K >=UHL< ft*< DI§«DIS) > 

260 NEXT K 

270 NEXT J 

280 RETURN 

299 REfl ### input ### 

300 ? "Rom :»j: INPUT J 
310 IF J<1 OR J>3 THEN 300 
320 ? "Steps :";: INPUT S 
330 IF S<1 OR S>19 THEN 320 
340 RETURN 

399 REfl ### shift row ### 

400 FOR 1=1 TO S 
410 H=KJ#iJ 

420 FOR K=l TO 19 
430 T< J,K>=T< J-K+l > 
440 NEXT K. 
450 TCJ,20>=H 
460 NEXT I 
470 RETURN 

499 REfl ### output ### 

500 POSITION ?,i:? #6;NT;:? *<£8C>t<;CLEfl 

84 



R>3"!NZ=0 

510 FOR K=l TO 20 

526 POSITION K-l#3:? #6iKl#K> 

538 POSITION K-l#4s? #6i'TX 2#IO 

54W POSITION K-Ij.5:? #6jT<3j.K) 

550 U=flBS<7X4*K'>-T<3*K>-T<2*K>-T<; UK 

560 IF U=W THEN NZ=NZ+1 

570 POSITION K-l,,-:? #6;u 

580 NEXT K 

590 RETURN 

593 REI'I *## '"nam program ### 

600 60SLI6 1 00 : REI'I i n i 1 1 a i i ze # 

610 SOSUB 500: REI'I output « 

620 IF N2=20 THEN POSITION 0,9:? #6;' 

d m "itil;" turns": END 

630 NT=NT+1 

S40 SOSUB 300: REI'I input # 

650 SOSUB 400: REI'I shift row » 

6$0 GOTO 610 



85 



Black Box 



Armed only with a laser beam you must discover the whereabouts of a handful 
of atoms hidden in a vast black box. 

The box consists of 8 x 8 x 8 cubes. Atoms can be hidden in any of the 
cubes, apart from those in the outer layer. However, there are never more than 
five atoms in the box. These atoms will reflect or divert laser beams according 
to the following rules. 

— a beam which strikes an atom is reflected straight back in the opposite 

direction 



o 



—a beam which is set to pass through a cube directly adjacent to an atom 
will be reflected at right angles 



o 



"T 1 

I I 



I 
,J_. 



— a beam which is set to pass through a cube diagonally adjacent to an 
atom will be reflected in a direction which can be obtained by adding two 



86 



right-angled reflections 




The box is numbered like this: 





/ / s s / y / / 


7> 




^ S S- ^ S- S- S- sT 








/ //- -""^ /-^ ^ 


s 






/ s y y y ^ y s 








/ / / / S S S* S 


y 


S 


y /////// 


^ 






tT 


> > > > >oO 


y 














8 




















7 


















6 


















5 


















4 


















R 


3 


















k? 


2 


















Q 5 


1 


















^3 




1 


2 


3 


4 
F 


5 
2 


6 


7 


8 


1 " rJ 



87 



The computer will ask you to enter PI, P2, and P3, the coordinates of the 
position where you want the beam to enter the box. Obviously, this must be on 
the surface, so at least one of the coordinates must be 1 or 8. When you have 
entered the shot the computer will tell you where the beam has emerged. 
Remember that a beam may be reflected by more than one atom. After you 
have had a few shots you should be able to work out where the atoms are. 

ia Rtn ####### 6 i a c k b o x ####### 

20 Ulfl i'K t',-i:>,Hm( i > 

30 bOl'O 500 

99 REM ### compute re-suit. ### 

108 bl=W: 32=0:33=0 

tie on <. pi=i >+< Pi=s >*2+< P2=i #c3+< P2=y ;'*4 

+< P3=l >#5-KP3=8 J^b bOSOfc: 248#250#268#£;?0 

,230,230 

i28 for fli=-i ro l 

130 FOR R2--1 rO i 

148 for us=-\ ro 1 

150 FOR 7=1 TO 5 

168 IF c C i'K i,l :'=P1+H1 .) UNO <I'K I j.2^=P2+H2 

.:> AND <fl«;T#3>=P3+fl3>> Then Sl=Sl-Hi:S2=S 

2-h2:S3=S3-h3:T=5 

170 NEXT T 

180 NEXT h3:nEXT H2:NEXT Al 

1 30 S 1 =93N< S 1 ) : 32=SbN(. S2 ? : S3=S8N< S3 ) 

288 P 1 =P 1 +S 1 : P2=P2+S2 : P3=P3+S3 

210 IF ( P 1 =0 >+<-. P 1 =3 >-K P2=W )+•'■. F'2=3 Hi F'3=0 

.:>+< P3=9 >=0 THEN 120 

£20 ? "Result: "jpl-bli" "#P2-S2#" "jP3- 

230 RETURN 

240 31= i: RETURN 

250 3l=-i:RETURN 

260 32=1 : RETURN 

278 S2=-l! RETURN 

288 S3=l! RETURN 

£30 S3=-l= RETURN 

233 RET'I ##* i nput c OOTd I nates- ##tt 

300 ? "Ente-r coordinates" 

88 



OR Pl>8 


1 HEN 


310 


,: INPUT 


P2 




UK P2>6 


i HEN 


338 


; : 1 NFUT 


P3 




OR F3>8 


THEN 


350 



310 ? "Pl= " i- INPUT Pi 

320 IP PK1 

330 ? "P2= ' 

340 IF P2<1 

350 ? "P3= ' 

360 IP P3<1 

3i'0 RE F URN 

336 REPI ### initialize «## 

4O0 PUP 7=1 TO 5 

410 FOR 8=1 TO 3 

42o PK I > S ;>= INK RNB< Jfitcfc+ii: ) 

430 NEXf S 
440 NEXT T 
450 ■■- " ■:;t:3C>ta:LtHR>J : ;e3C>C=3= B L H 

C K BOX ==<Eyu.;L=J" 
460 RETURN 

466 REn ####* main program ##### 
500 SOS'UB 400! REfl initialize # 
5lO ? "please enter Shot" 
520 SOS'UB 380: REfl input coordinates # 
530 j F t. p 1 = l :>+(, P l =8 >+'■. P2= l >+(, P2=8 m P3= l 
;■+'; p3=y x ;■ i then 52o 
540 SOSUB lO0:REPI compute result # 
550 ? :? "Shoot or guess "i: INPUT HH$ 
560 if hh?="5" Then 5io 
5, :, ? "please enter guess" 
560 606UB 300: REfl input coordinates # 
390 PUR 1=1 lu 5 
600 IF ( >'K 1*1 .>=P1 .5 HNU aiU^.!^) HNLI < 

PKT,3>=P3) THEN ; ' "Right !":LnUIU 558 

610 NEXT r 

k20 '■" "wrong ! M :6UiU 550 



89 



Treasure Hunt 



Have you ever dreamed of going in search of hidden treasure? Of journeying 
through wild and hostile countryside, living off the land and sleeping rough, 
until you reach the remote and forbidding land where your glittering prize is 
hidden? If so, this is the game for you. 

You will be taken high up into the Rocky Mountains and given a map 
which shows where the treasures you seek are hidden, and what they are worth. 
To reach them you must make your way along narrow twisting paths — one 




90 



false step means certain death — by using the I, J, K and M keys. You discover 
the treasures simply by treading on them. 

But wait . . . it's not that easy. You didn't really think it would be that 
simple, did you? The treasures you seek are very carefully guarded by some 
extremely vicious and terrifying birds who will attack you if you are not 
careful. If they get you in their sights you will be paralyzed with fear. The only 
thing you can do to try and stop them is to press the S key. 

If you still feel up to the challenge start your search in the lower left hand 
corner of the map. Collect as much treasure as you can and take it away 
through the upper right hand exit. This will give you bonus points, and another 
chance to journey along the paths, picking up treasure. In fact you can make as 
many treasure-seeking trips as you can get away with. Unfortunately each time 
you go through you disturb more of those appalling birds, who become increas- 
ingly aggressive. 

The risks are high, but so are the rewards, so gather up your courage and 
off you go! 

10 Kbi'j ff#######ff I reasure Hunt ######### 

20 Dlf'i I $■:. 15 ;■.£-:$>; 300 J 

3m Din Pl$< i ?..SPs<; l )#HU$< l .^Bisc i .:■ 

48 OPEN #2»4*8*"Ki " 

50 GRAPHICS I? 

60 GOTO 1000 

yy REi'i ### change character-set ### 

100 rOP=PE£K':. IWb :-y 

110 PORE 204* TOP: PUKE 206*224 

120 FOR 0=1536 TO 1555 

130 REHU Us POKE U,U 

140 NEXT LI 

150 0=USFK 1536;' 

160 DflTH 104 * 1 62*4 *lfcii,0, 17^205, 145,283 

, 200 , 208 , 249 , 230 , 206 , 230 , 204 , 202 , 208 • 242 

,96 

1 78 RHI'ISET=T0P£256 

188 PUR U=RHl'IStT+3£8 TO RHI'ISET+5*8+7 

91 



198 READ U:POK£ U,u 

268 HEX I U 

218 POKE ,'56, TOP 

220 RETURN 

238 Dm ft 255,255,255,255,255,255,255,255 

240 OATH 5?, 18?,254,G0,68,254, 123,49 

250 DATA 1 89 , i S9 , 1 53 , 255 , 60 , GO , 36 , 1 02 

299 REP'I ### initialize S, screen ### 

300 F1U*= " £#e " : B I *= " CD J " : PLS= " SCEJS " : SP*= 

U u 

31w ? *6j:"<ESC>E^CLEflR>3"*PL*i8I*#*Q tre 
asure hunt 8" ; PL*; Bis 

320 ? #6* "RUNS : ";NC 
338 ? #8 i "BOOTY: ";P2 
340 RESTORE 4W8 




92 



358 FOR V=0 TO 19 

368 HERD T*sB$<l5&¥+l)=T*i? #6*T* 

370 NEXT V 

388 S=l:V=l9:P0SI TION K^V+3:? #6;PL$; 
390 RETOKN 

399 REfi ### screen data ### 

400 dhth e###*#########e e#e 

410 doth e#87 e#e8e#89e#e tqm e#e 
420 dhth e##e e#e @*e e##e e#fi 
430 DftTfi e*#e e»######e e*e e#e 
440 data e#e n*#i2 e##e 

450 DfiTO GNNJ S####e ^###666*6 

460 dhth e#e e#8 3e#*##*e 58#e e#e 
4?w dhth e#Q e#e 4G#es e#e4 e#e 
480 DfiTfl e###e e#e e####G e##e e#e 
490 data e#e e#e e#e fit® 
500 dhth e#e e###iv e#####e e#e 
5ie data e#e e#64 et*e e##e 
520 dhth e####eie####e f#*e 
57.0 dhth e#e 3e##e e##ii 2e#e 
540 dhth e#e e#eie#e3e#e e##£3 e###e 
550 dhth e*G e#e e###e e##e e#e3e#e 
St* dhth e#e e#e ete 
570 data e###e e##e e###e e##e e#e 
saw dhth e#e e#ei etig £#fi 

599 REIT *#* player's move ### 

600 T I =RHD'; 8 >*< 488-30SNC > 
610 FOR DO=l TO TI 

620 IF PEEKX 764 >=255 THEN 750 
630 bET #2 # IN 

640 *;=<; I N=42 :>-< i n=43 ) 

g5g uv^i ir+=6i X IM=45) 

660 LOCATE X+UajV+OV+Z.^ST 

670 IF ST=ASC<IU*> THEN 750 

680 POSITION X.V+3:? #6iSP*i 

690 X=K+UX! y=v+UV 

780 FiJ=ST-4y 

?10 IF F'O-=;0 OR F'0>9 THEN 750 

?20 BStV+lS+l+^VSilS+l+X.^SPS 

730 P 1 =F' 1 +P0 : P2-P2+P0 

93 



740 POSITION 7,2:? #SiP2i" DULLHR"; 

750 POSITION X,V+3:? #6iPL*i 

760 IF V=0 THEN DU=T] 

770 NEXT DO 

780 IF V=19 THEN SOW 

790 RETURN 

7 J 99 REH ##* bird attacks *## 

800 DT=25-5*NC:BX=19 

810 POSITION BX,Y+3:? #6i8I*i!G0T0 840 

820 BX=BX-1 

830 POSITION BX,V+3:? #6;B1*;" "; 

840 FOR W=l TO DT:NEXT H 

850 IF BX>0 AND PEEK<?64X>33 THEN 820 

860 IF BX<=X THEN POSITION 4,23:? #6;"en 

d of same ".;: GOTO 860 

870 POSITION 0,V+3 

880 ? tbiB^VXlS+lj.cV+l )Sl5)i" "i 

890 Pl=Pl+l 

900 POSITION X/V+3:? #6;PL$; 

910 RETURN 

899 REN ##### main program ##### 

1000 60SU6 100s REN characterset # 

1010 GOSUB 36©: REH initialize k screen # 

1020 60SU6 600: REfl player's move # 

1030 IF Y=0 THEN NC=NC+l:P2=P2+NC¥Pl:Pl = 

0:6010 lwitf 

1040 GOSUB 800: REN bird attacks # 

1050 60T0 1020 



94 



I.T. - 
Century 



The Adventure of the 



In this crazy adventure you will sink into the bowels of the earth and meet a 
very strange creature who lives there. His name is, of course, I.T. which stands 
for Intra Terrestrial. 

If you have never played an adventure game before don't worry about the 
rules — there aren't any! You have to work everything out for yourself as you 
journey beneath the earth's surface, performing extraordinary tasks and facing 
terrifying dangers as you go. If it all gets too much for you enter HELP and see 
what the computer comes up with. 

So, type in the game, take out a good insurance policy, give the RUN 
command, and off you go! 




95 



18 REI'i *#*#########* I. T. *###*#######* 

law SOSUB 5000 

110 lHD=8:NKHfl=0 

120 SOTO 140 

130 GOSUB 500 

140 GOSUB 1000 

150 SOSUB 800 

160 IF CWD<6 THEN GOTO 130 

17'@ GRAPHICS 

law ? " CONGRATULATIONS! 

190 ? " YOU KILLED YOURSELF 

200 STOP 

500 REI'I ##* input ### 

510 NKHfl=0: IHD=0 

530 ? "Wl^at would you liKe to do" 

540 INPUT VV* 

545 IF LEN<YV*>=0 THEN GOTO 530 

550 FOR 1=0 TO 14 

560 IF H*<I*11+1,I*11+LEN<VV*)>=VV* THEN 

IHD=I+i:I=15 
570 NEXT I 

580 IF IHD=13 THEN ? "ON OR OFF?": INPUT 
VV*:IF VV*(2>="F" THEN IHD=14 
590 IF IHD>6 THEN RETURN 
600 IF IHD=0 THEN ? "1 DON'T UNDERSTAND 
VOU": GOTO 500 

610 NKPi'l=K<IKI1,lHD>:lF NKflM<>0 THEN RETU 
RN 

620 ? "VOU CAN'T GO IN THAT DIRECTION":G 
OTu 500 
670 RETURN 
800 REf'i OUTPUT 

810 ? "YOU'RE IN THE ";R*< IKf'l*15-14, 15*1 
Kl'i > 

811 IF IKI'I>24 OR BLL=1 THEN GOTO 820 

812 ? "VOU CAN'T SEE I'ttJCH HERE": GOTO 830 
820 IF IUWO0 THEN ? "THERE IS A ";U*<12 
*IUH-il,12*IUW>i"HERE" 

830 FOR 1=1 TO 6: IF kXIKrl,lX>0 THEN ? " 

VOU CAN GO "iH*< 1*11-10,1*11) 

840 NEXT I 

850 ? :? : RETURN 



96 



1000 REfl #.*«** OPERATIONS »**-*#» 
1018 IF NKAPK>0 THEN IKfl=NKBPl 
1020 IUW=M 
1030 FOR 1=1 TO 12 
1040 IF U<n=IKH THEN IUW=IsI=12 
1050 NEXT I 
I860 IPS=8 
1070 FOR 1=1 TO 6 
1080 IF pa,l)=IKn THEN IPS=I:I=6 
1030 NEXT 1 

1100 REfl « GENERAL OPERATIONS #* 
1110 IF <IKI"K12) AND <CRI<>8> THEN 60SUB 
4860 
1120 CLL=CLL+BLL 

1200 REI1 « PERSONAL OPERATIONS ** 
1210 IF IHD<7 THEN GOTO 1240 
1220 GOSUB 1300-K IHO-?>*200 
1230 REfi HANDLERS 
1240 IF IPS=0 THEN RETORN 
1250 GOSUB 3000+< IPS-1 >*200 
1260 RETURN 

1300 REfi «» KILL !«#* 
1310 IF <IPS=0;> OR <1PS>4> THEN PRINT "T 
I HE IS THE ONLV THING VOU CAN KILL HER 
E ! ! " : RETURN 
1320 LET 1UHB=? 
1330 GOSUB 4800 

1340 IF IB2=0 THEN ? "I HON'T LET YOU AT 
TACK WITH BAREHANDSiTHAT'S SUICIDE" sRETU 
RN 

1350 PRINT "SO VOU WANT TO KILL 1HE";P*< 
1+10*IPS-10*18*IPS> 

1360 ? "VOU ATTACK IT WITH VOUR SWORD "i 
1370 IF RNCK0XU.5 THEN ? "BUI YOUR UICT 
W\ HOMES AWAV QUICKLY": GOTO 13S5 
1380 ? "AND VOU GIUE VOUR UICT i IT A TERR I 
BLE BLOW" 

1390 LET PUPS,3>=P< I PS, 3 J- 1 
1395 IF RND(0>>0.2 THEN GOTO 144W 
1400 ? "THIS IS VOUR CHANCE: VOU CAN HIT 
IT AGAIN BEFORE IT RECOVERS" 

1410 ? "DO VOU WANT TOY" 

1411 INPUT VV* 

97 




1420 IF WKDO'V" THEN GOTO 1440 

1438 ? "VOU RPlISE VGUR SHORD HGhIN ";:G0 

TU 137W 

144« IF P<IPS,3)>1 THEN RETURN 

1450 IF P(IPS,3>=1 THEN ? "YOUR UlCTIfi I 

S BftDLY HOUNDED": RETURN 

1460 ? "VGU KILLED VGUR UICTIH" 

1470 P<IPS,1>=0:IUW=S+1PS 

1480 G<IUH^=IKn:lPS=0 

1490 RETURN 

1500 REC1 **** HELP **#* 

1510 ? "POSSIBLE COIimNDS: " 

1520 FOR 1=1 TO 13 

1530 ? H*( 1+1 1*1-1 1,1 1*1; 

1540 NEXT I 



98 



1550 ? 

1568 RETURN 

1700 REPI #*» TAKE «+¥* 

1710 IF IUWO0 THEN GOTO 1740 

1720 ? "THERE IS NOTHING TO TfiKE HERE" 

1730 RETURN 

1740 ? "VOU TfiKE IHE "iUK 1+I0W*12-12*IU 

M*12) 

1751 EKIBPWX^IUW 

1760 I6PlfiX=I6PlflX+l 

1778 U< IUW;>=0 

1788 IMw=0 

1790 RETURN 

1900 REPI #*#* DROP **** 

1309 ? "WHAT 00 VUU WHNI TO DROP?" 

1311 INPUT YY* 

1312 L=LEN<YY*> 
1320 IOWB=0 

1330 FOR 1=1 TO 12 

1340 IF W*=U*< 1-KI-l >J12,12*U-1 >+L> IH 

EN IUN6=I:I=12 

1350 NEXT I 

1360 IF IUWBO0 THEN 6QTQ 1338 

1970 ? "I DON'T UNDERSTAND VUU" 

1380 RETURN 

1390 60SUB 4SO0 

2008 IF IBZO0 THEN 60T0 2030 

2010 ? "YOU DON'T HOME H "»W* 

2020 RETURN 

2030 ? "YOU DROPPED THE " A'*< 1 + 12*B< IB2.) 
-12,12*B<. I62>) 

2040 IUw=B< I62> 
2050 U<B<I6Z):>=IKP1 
2060 B< IBZ'JMEK IfcSPIfiX-1 > 

2070 ier'(HX=iBf)HX-i 

2080 "( "DO VOU WANT TO DROP MORE?" 
2090 INPUT YY$ 

2031 IF YY*<1,1)="V" THEN SOTO 1300 
2035 RETURN 

2100 REPI %%% INVENT *#* 

2110 IF I6P10XO1 THEN 60T0 2140 

2120 ? "VOU UHN ONLY YOUR CLOTHES" 

gg 



2130 GOTO 2180 

214a ? "VOU HflUE THE FOLLONING THINGS:" 

2150 FOR 1=1 TO IBPirtX-l 

2160 ? U$<1+12*B(I >-12#12*BU >) 

2170 NEXT 1 

2180 ? "VOU OWN SURUIUE " j5-CHD#" (TORE W 

OUNDS" 

2190 RETURN 

2300 KEPI $*& BONDAGE *** 

2310 IUWB=6 

2320 GOSUB 4800 

2330 IF IB2O0 THEN GOTO 2360 

2340 ? "VOU WON'T PiHNHGE THAT WITHOUT BW 

NDAGE" 

2350 RETURN 

2360 ? "IT DOESN'T LOOK UERV HOPEFUL" 

2370 ? "VOU'LL NEED ALL VOU HflUE" 

2380 SOUND 0,244,10*10 

2390 ? "SO THAT WILL HOLD FOR W WHILE" 

2400 CWD=0 

2410 B< IBZ >=&(. IBPiwX-1 .:■ 

2420 IBP'lwX=IBPiHX-l 

2430 RETURN 

2500 REP1 ttt LANTERN ON *** 

2510 IUWB=1 

2520 GOSUB 4800 

2530 IF IB2O0 THEN GOTO 2560 

2540 ? "GET W LHNTERN FIRST" 

2550 RETURN 

2560 ? "VOU TURNED THE LHNTERN ON" 

2570 6LL=1 

2580 RETURN 

2700 REP1 ***% LWNTERN OFF **** 

2710 IUWB=1 

2720 GOSUB 4800 

2730 IF IBZO-0 THEN GOTO 2760 

2740 ? "VOL) 00 NOT EUEN HAUL H LANTERN" 

2750 RETURN 

2760 ? "THE LHNTERN IS OFF" 

2770 BLL=0 

2780 RETURN 

2900 REP1 Ztttt READ ****** 

100 




2905 luwB=4 
2910 GOSUB 4S00 

29 IS IF IB2O0 ThEH 6OT0 2938 

232a ? "VOU CfiN'T REHO H BOOK IF YOU DON 

' T HhUE ONE " 

2925 RETURN 

2930 IF BLL=1 OR IKI'I>24 THEN SO fu 2955 

2940 ? "IT IS TOO DORK TO REhD HERE" 

2958 RETURN 

2955 ? "THERE IS H RECIPE FOR COOKIES IN 

THIS BOOK" 
2960 ? "IT ShyS: ThKE ONE OtwO HELLHOUND 
AND SOI'lE HHEPTiDROP THIS ON H BhRBEuUE 
hND WHIT FOR H FEW PIInUTeS" 

29S0 ? "THAT'S HLL" 



101 



2998 RETURN 

3060 REf'l ttsfcfcTO* I.T. $**:«:*#* 

30 1 IF I UM=3 THEN P< 1 , 2 >=3 ! M< IUM >=0s I Uw 

=0 

3020 GOTO 3020+P<l,2}#10 

3030 ? "I.T.<THE INTRATERRESTIAL;' IS HER 
E" 

3031 ? "HE'S TALKING URGENTLY," 

3032 ? "BUT VOU DON'T UNDERSTAND Hlfl" 

3033 K 1 ,2 >=2 

3034 RETURN 

3040 ? "I.T. GESTURES THAT HE IS UERV" 

3042 ? "THIRSTV. HE LOOKS RATHER DESPERA 
TE U 

3043 RETURN 

3050 ? "I.T. DRINKS THE WATER AS HE NEED 
S" 

3051 ? "IT UERV I'lUCH. AFTER A WHILE HE ST 
ARTS" 

3052 ? "TALKING AGAIN. NOW VOU CAN" 

3053 ? "UNDERSTAND Hlfl" 

3054 ? "*■*? says : PLEASE 60 DOWN INTO THE 

CAUES AND FIND THE NULL I TV BONO" 

3055 ? "SOJ'IE CRAZY PROFESSOR WANTS TO BL 
OW UP THE EARTH WITH IT" 

305S ? "I HAD A FIGHT WITH THE MONSTER T 
HAT PROTECTS IT" 

305? ? "NOW I'd TOO WEAK ; SO ONLY VOU C 
AN SfiUE THE EARTH FROI'I DESTRUCTION" 

3058 ? "SUDDENLY I.T. COLLAPSES" 

3059 P< 1 ,2 >=4: RETURN 

3060 ERROR- ? "IT LOOKS LIKE I.T. IS I 
N COHA"GOTO3050 

IT ALL ALONE" 



3061 


? "NOW YOU HAUE TO 


DO 


3062 


? "GOOD 


LUCK" 




3063 


P< 1 .2 >=t 


i 




3064 


RETURN 






3070 


? "I.T. 


IS HERE " 




3071 


? "HE IS 


i IN CORA" 




30^2 


RETURN 






3083 


RETURN 






3200 


RBI ** 


DRAGON 


** 



3210 IF IUW=8 THEN P<2#2)=5!U< IUW>=0:IUH 

102 



=0 

3220 60TG 3220+<10*P<2*2>) 

323B ? "THERE IS HN ENQRHOUS I'IUNSTER HER 

3231 ? "ITS EVES ARE ROLLINS" 

3232 ? "IT VELLS:hRE VOo COOKIE?" 

3233 P<,2,2>=2 

3234 RETURN 

3248 ? "THE T'lGNSTEK VELLS LOUDER AND LOU 
DER: " 

3241 '?' " ARE VOU COOKIE?" 

3242 P<2#2)=3 

3243 RETURN 

3250 ? "IT KEEPS VELLIN6 AND BECOMES RAT 
HER AGRESSIUE" 

3252 P<2#2>=4 

3253 RETURN 

3260 ? "THE PiUNSTER SIUES VOU A TERRIBLE 
BLUH" 

3261 ? "VGUR HEAD IS SPINNING" 

3262 CHD=CAO+l 

3263 P( 2 , 2 >= I NT< 3*< RNCK ) )+2 ) 

3264 RETURN 

3270 ? "THE CTONSTER SftVS SURPRISED: COOK I 
ES?" 

3271 ? "IT STARTS EATING AT ONCE" 

3272 ? "HN ENORf'lOUS BONG AND IT FALLS 
HSLEEP" 

32c'3 K<. 16^6 >=1 
3274 P<2,2>=6 
327'5 RETURN 

3280 ? "THE HONSTER IS ASLEEP" 

3281 RETURN 

3400 REfl «« SNAKE *$» 
3410 ? " THERE IS H SNEAK V SNAKE HERE" 
J420 IF RNLK0XO.4 THhN RETURN 
3430 IF <IBCWX=1) OR (RNDC0X0.5 > THEN 6 
OTO 3470 

3440 IBf1AX=IBPlAX-l 
3450 U< E« I BP1AX > >=13+INT< 1 2*RND< U ) ) 
3460 ? "WITH A QUICK PIOUE IT SNATCHES 
SOMETHING" 



103 



3478 ? "AND IT SNEEKS HWwV" 

3488 P< 3j 1 >=P< 3, i H3 

3438 IF P<3,1)>24 THEN P<3,i >=P<3 J .l ;-b 

3500 RETURN 

3600 REi'l *£* HELLHOUND *** 

3620 SOTO 3620+P';4,2>*10 

3630 ? "THERE IS W GIANT HELLHOUND HERE" 

3631 ? "IT LOOKS LIKE HE HANTS VOU FOR D 
INNER" 

3632 P<4,2>=2 

3633 RETURN 

3640 ? "THE HELLHOUND ATTACKS VOU AND BI 
TES VOU UIOLENTLV" 

3641 CHD=CWD+1 

3642 P<4,2>=3 

3643 RETURN 

3650 ? i'THE HELLri0UND_ GROWLS AND SEElTS T 
PREPARE FOR HNOlHER ATTACK" 

365 1 PC 4 , 2 >=2+ 1 NT< RNCK >t2 > 

3652 RETURN 

3800 RSI »-** tiOf'IB **** 

3810 ? "THE NULL I TV 60HB IS HERE." 

3820 ? "THERE ARE THREE WIRES BETWEEN TH 

E" 

3830 ? "BOCIB WND THE TIl'iE l'IECHHHlSl v i:H GR 
EEN" 

3831 ? "ONE < 6 :'*H VELLOW ONE <Vj HND H R 
ED ONE tRr' 

3832 ? :? "VOU RUST DISCONNECT TwD OF TH 
Ell TO STOP IT" 

3840 ? "WHICH WILL BE THE FIRST ONE?" 

3845 INPUT !Q& 

3850 ? "WHO THE SECOND ONE?" 

3855 INPUT W* 

385/ CB=0 

3860 U$="VRG" 

3861 FOR T=l TO 3 

3865 IF X)!*(1,1)=OKT,T:j OR VV*< I A >=Q$< 

1,1> THEN CB=CB+1 

3870 NEXT T 

3880 IF CB<2 THEN ? "WATCH OUT! WRONG IN 

PUT ! " : GOT 3840 

3900 IF ABSC WSCC »<$ ;>-wSC< VV$ >>= 11 THEN G 

104 



TO 393W 

3985 GRAPHICS 0:? "ENORMOUS EXPLOSION 

nusHRuori cloud >. \ - 

391U end 

393m ? "CONGRATULATIONS! ! ! VOU SUCCEEDE 

_ WHERE EUERVONE ELSE FOILED" 

3958 END 

400M REPi #* BARBECUE S* 

4010 IF IU!4=0 THEN SOTO 4060 

4030 IF <U<2>=IKri5 HND <K>< 12}=IKFI} THEN 

IMW=y: U< 8 >=IKM:U< 2 )=0: U( 12 >=&i P< 6,2 5=2 

4060 GOTO 4066+ 10*P< 6,2 > 

4870 ? "THERE IS A 6 1 ANT BARBECUE HERE" 

4071 ? "WITH l-l LhrGe FIRE UNDER IT" 

4072 RETURN 

4880 ? "HN ENQRflOUS FLASH LIGHTS THE F'Lfi 
CE" 

4081 ? "HND H PENETRATING SHELL FILLS VO 
UR NOSE" 

4082 P<6#2)=3 
408:3 RETURN 

4898 ? "EUERVTHING IS QUIET NOW" 

4091 ? "EVEN THE TERRIBLE SHELL FADES" 

4092 P<6 J .2;-=1 

4093 RETURN 

4808 REH +* LOOK IN 0WN1NGS tt 

4810 IB2=8 

4820 FOR 1=1 TO IBP'IAX-1 

4838 IF B<I.J=IUWB THEN LET IBZ=I : I = IBflfiK 

-1 

4848 NEXT I 

4858 RETURN 

4860 Rtfl #**# PUZZLE *$ 

4865 CR0=CR0+1 

4870 IF IKPNCKCRQ) THEN CRI=CRI+l 

4875 IF CR0<8 THEN RETURN 

4880 IF CR1=8 THEN GOTO 49 15 

4885 PRINT "STRAN6E THINGS PRE HAPPENING 

4398 PRINT "HN ABSOLUTE DARKNESS COMERS 
VOU HND IT FEELS fiS IF HN INUISIBLE FO 
RCE IS LIFTING VOU" 



105 



4895 ? "FOR U POTENT YOU ARE UNCONSCIOUS 

43O0 CRO=l:CRI=i 

4305 IKfM 

4310 RETURN 

4315 ? "YOU HEHR ft STRAN6E SOUND LIKE SO 

HETHING IS BEING PUSHED BHflV" 

4320 ? "NOH IT HAS STOPPED" 

4325 kX2,l>=3 

4338 RETURN 

5000 REC) ### initialization ### 

5010 ? "<ESCXSHIFTXCLEfiRXESC>t=3<ESO 

<TfiBXESCXTHB>e g" 

5020 ? "<ESCXTABXESC>OftB>e I. T. 

e" 

5030 ? M <ESCXTflBXESCXTflB>e ii 

5040 ? " < ESC X TftB X ESC X i fiB >t'P 1 ease ma 1 1 

e" 

5050 D i II K< 36 * 6 > , RSX 540 J , W, 1 65 ) 

5060 D1P1 P<6»3>j.P*<60M»<12>»U*<144) 

5070 DID B<12)>0<8> 

5180 REfl ### connections ### 

5110 FOR 1=1 TO 36 

5120 K<I*1 >=I+i:Kt I,2)=i-1SKX I#5>=0 

5130 K< 1 ,3 J=l+4: K<. 1 ,4 )=I-4: K< I ,6 >=0 

5140 NEXT 1 

5150 FOR 1=0 TO 24 STEP 12 

5160 FOR J=l TO 3 STEP 4 

5170 K< I+J+3,1 ^=«:K<; I+J,2)=0 

5180 NEXT J 

5130 FOR J=l TO 4 

5200 K< I+J+8,3>=0:I<a I+J,4)=0 

5210 NEXT J : NEXT I 

5230 K< 1 .5 >=16: KX ?#5 >=15 

5240 K<32,6^=13:KU3,5;'=32 

5250 K< 35 j.6 >=18: KC 1 8- 5 >=35 

5260 FOR 1=1 TO 15 

5270 REftD U: REftD H."LEl K<U,H>=0 

5230 NEXT I 

5300 REfl ## initialize parameters ### 

53101 Kf1=36 : 1 B2= 1 : 1 BflftX= 1 : CKfi=W 

106 



5340 CLL=« : BLL=a : CWD=0 : CRO=0 : CR I =0 
5400 REH ##« till arrays #*# 
5405 DIf1 W*U5>!DIfl xxsas;' 

5409 H*= " " : H$0 65 )= " " : H $<■. 2 >=HS 

5410 FOR 1=1 TCI 15 

5420 REHD W*: H*< < I -1 >*1 1+1 * I *1 1 >=' t'V* 

5430 NEXT I 

5435 U$= " " : U*< 1 44 .:■= " " : U$< 2 >=U* 

5440 FUR 1=1 TO 12 

5450 REHD W$ : U*< < i - 1 >* 1 2+ 1 , 1 * 1 2 >=W* 

5460 NEXT i 

5465 P$=" ":PS<S0>=" " :P«2>=RJ 

5470 FUR 1=1 TO 6 

5480 REHD V V* : P*< (I - 1 )* 1 0+ 1 , I % 1 >=W* 

5490 NEXT 1 

5495 fi*=" ":R:f(540.:'=" ":R*<2>=R$ 

5500 FUR 1=1 TU 36 

5510 REWD W* : R$<; < I - 1 )* 1 5+ 1 , 1 % 1 5 ;>=VVS 

5520 NEXT 1 

5530 FOR 1=1 TO 12: REHD DUX liMBsNEXT I 

5560 FOR 1=1 TO biREHD D,E 

5570 H 1 , 1 >=D:P< I »2 )=1 : P< 1 ,3 :.•=£ 

5590 NEXT I 

56W0 FOR 1=1 TO 8 : REHD E:CK 1 >=£:NEXT 1 

5700 RETURN 

6000 OftTA EHST,w£Si , NORTH , SOU THj UP ,OOWNji 

K I Ll_ , HELP , T'HKE , DROP , I NuENT UKY , BHNDH6E , LH 

NTERN ON,LHNTERN OFF ..REHD 

6010 DHTH LANTERN j.WHEflTPlLE*HfiTERSflGK,CO 

OKBOOK , LEhFLE T , BHNDH6ES , SWORD 

k0ii DHTH COOK] EMBODY OF l.T. J.6IHN1 CORP 

se, sliced snhke,dehd hound 

6020 dhth i.t. ,nonst£r,snhke, hellhound, b 

0l16,BHRBECUE 

K030 DHTH RESET CHUEi.|-CHUE,SLCREi CORR1 

DOR , CON TROL ROOlT , Q-CHUE , I -CHU E , SPHCE CHU 

E , BLWCK ROOIT , P-CHUE , E-CHUE , N-LM 

6032 DHTH E!TPPt'NESS,SITHLL CflUt»ROCKV CHU 

t, SHELLY CHUE,0KHG0N CHUE,SNHKE CHUL,YtL 

LOW CHUE,STREHiT ESHNK#$TINKY PlhCE 
b033 DHTH FOOD CWU£,FiNHL CHUt, COLORED C 
HUE, ICE CfiuE,OPEN PLHCE, WOODS, WOODS, WOOD 
S , WOODS , WOODS , WOODS , WOODS , HOODS 

107 



6035 DHTH HOODS, WOODS, MOODS 

B058 DftTfl 34, 2, IS, 15, if, 4, 29,2, 8,1, 25,1 
6068 DhTh l#5*9#ie#H#V#8#2 



108 



The Wolf and the Five Little Goats 

A Grimm's fairy tale? No, an intriguing board game! This game is played on a 
checkerboard displayed on the screen. As the game begins, the goats are scat- 
tered throughout the lower half of the board and are represented by little 
squares containing a number. The wolf stands at the upper left-hand corner of 
the board. 

Off we go — you are the wolf, and the computer controls the goats. You 
win if you eat three goats, and the computer wins if one of the goats eats you. 
(These wolf-eating goats are amazing creatures!) 

You may start. On the lower part of the screen you see: 



STILL . . . MOVES 
for example 

STILL 2 MOVES 



The number of moves always lies between 1 and 3, and tells you how many 
steps you may take during your turn. The wolf — in other words, you — may 
move horizontally or vertically, but never diagonally. Each move must be 
entered by using the I, J, K and M keys as cursor keys. If the last move of a 
series of moves brings you on a square with a goat, the goat is yours. You may 
never cross a square that has a goat on it. 

There are 5 goats in all, and they may jump over each other. Goats can 
move only in one direction. The number of steps they may move is shown on 
the goats themselves, and is always between 1 and 5. For instance, if a goat 
bears the number 3 he can move 

109 



3 steps to the left, or 
3 steps to the right, or 
3 steps forward, or 
3 steps backward 

He cannot move 1 step forward and 2 steps to the left. If you (the wolf) have 
moved to a new position the computer shows 

NOW IT'S MY TURN 
When it is your turn, the computer shows 

STILL . . . MOVES 
At the end of the game the computer either tells you 

YOU WIN! 
or worse 

YOU LOSE 

10 RBI ##### The woit find #»### 

##### The b Liuif tio.at.-E. ##»## 
20 Li III P<4*2?j f*< l > 
30 OPEN #2 , 4 , & , " K : " : OPEN #-'■ • 4 , & , " S •' " 
40 SRftPHICS 18 
50 SOTO 1080 
58 SOTO 1000 

93 Rhi'l ##* initialize ### 
1 00 P.BI'11 N= 1 : RBP'IHX= 1 : KBfl 1 N=5 : KBl«*= 1 4 
1 1 RH=RBI1 1 N : KH=KBr1 1 N : [1flX=-400 : BEhT=0 
120 '?' #S;"ii iDoitLFJLUJ goatsii'" 

110 



130 FOR 1=8 FO 9 

140 ? #b>" " 

i5w Ntxr i 

160 FOR 1=0 10 4 

1 70 F\ I M j=J NT< 5*RNCK O > J+RBi'i I N+5 

180 P< 1 , 1 ^= I NT< 1 W*RNO< J >+K6Jl 1 N 

l 98 P< I *2 )=INT< 5*ftNCK ;■ w l 

200 POS I T I ON P>; 1 , 1 > , pf 1 , .:■ : ? #6 iPt 1 *2 ) 

210 NEXT 1 

220 POSITION KH,Rh:? #t;; l, W:BW=2 

238 RETURN 

299 REfl #ff* inpux, arid move ### 

300 FOR BW=BW TO 1 STEP -1 
310 POSITION 2,11 

320 ? #Si" si-iii "ibH;" moves " 

338 GET #2,l'luUE 

340 ORW=< f'IOUE=61 HND RW<RerlHX>-a'tOOE=45 

HND RW>RBI1lNP 

350 DKW=<n00E=42 HND KMOCBfV&X rWE=43 

HND KH>KBi'llNJ 

360 IF DRH+DKW=0 THEN 330 

370 POSITION k.h+OKh,kh+DkH:GET. #3,X 

380 IF CHRs<; X X > " . " HND BN<>1 THEN 330 

390 POSITION KH#RNJ? #8;"." 

4O0 RW=RH+DRH:KH=KH+OKH 

4iO POSITION KH,RH:r #&i*W* 

420 NEXT BW 

430 FOR 1=0 TO 4 

440 IF RH=P<I,0; HND KW=P<I#1) PINO KI#2 

><>0 THEN P< I,2.>=e:BhHT=BEHT + l 

450 NEXT 1 

4S0 BW=INT<3*RNO(0;h-1 y. POSIT ION 2*11 

470 IF BEHT=3 THEN ? #Gi"f you urni CHJ 

i^':Gtr #2,X:END 
480 '? #bi"l?nooi it,tDJ= my ujrnt" 
490 RETURN 

499 RED ### -3.t,at,us ### 

500 STHT=0 

510 IF RS<R8f1IN OR RS>R8f'IHX OR KSKKBPIIN 
UK KS>KBI'IHX THEN HE I URN 
520 D=HBS< RW-RS >+H6S< KH-K.S ) 
530 IF U=BW THEN RETURN 



111 




D=BH-2 THEN STHT=-200 

0=6 THEN STOT=500:8GTG 640 

D<=5 THEN STffT=STPlT+35 

RS=RW THEN STftT=STfiT+48 

KS=KH THEN STHT=STftT+4ti 

HBS< pf i ,0 >- RH ?+flBS< Pi 1 , 1 P-KH >=tiH 



540 IF 

556 IF 

569 IF 

570 IF 
580 IF 
590 IF 

THEN STOT=STfiT+80 
600 FOR 1=0 TO 4 
610 IF RS<>P< Tj.0? 

I F KS<. >P< T » 1 > 

NEXT T 

IF STHT+RNCK0 



620 
630 
640 
650 



[HEN 6IHT=SThT+10 
THEN 6ThT=SThT+10 

_ .KI'THX (HEN RETURN 
mX=ST«T: If1fiX=l : fiPMx=RS: KIWX=KS 
66W RETURN 

699 REN ### evaluate goats ### 

700 i v iHK=-400 
710 FOR 1=0 TO 4 

720 IF P<1,2.J=0 THEN 810 

730 KS=P<; 1,1 ?: RS=P< I ,0 >+P< 1 ,2 > 



112 



746 80SOB 500 

,'50 RS=P< 1*8 >-P<. i * 2 :> 

?6y GOSUB 5yy 

778 RS=P< 1*0 >: KS=P< 1 , 1 ?+P< I *£) 

?'t!0 80SUB 500 

798 KS=pt I#l >-P< 1*2.) 

800 GOSOB 500 

t: 10 NEXT I 

820 RETURN 

Say REfl ##» move goat ### 

900 POSITION KIfWX*l)*P<II1RX»0J 

910 ? #6;"." 

920 PC ITO*4ji0)=FS1fiXsP< IWDirl )=KTOX 

930 P< If1flX#2>=INT<5*RND<8,>+i ;■ 

940 POSITION Kl'INXjiKi'lHX:? #6iPC IPlfiX,2 > 

950 IF f'IHX<400 THEN RETURN 

9B0 POSITION 2 j. 11 

970 ? #6i" gyou lose LHJli " 

980 BET #2#Xs£ND 

999 REfl ##### mam program w## 

1000 GOSOB 100:REH initialize # 
1010 GOSUB 380: REfl input :j : move # 
1020 GOSUB 700! REfl evaluate goats # 
1030 GOSUB 900: REfl move goat # 
1040 GOTO 1010 



113 



Spring 



A number of well-known computer games are based on fairly straightforward 
physical equations. For instance all those 'lunar landing' games use an equation 
which gives a position as a function of time when the initial position and 
velocity and the acceleration due to gravity are known. 

SPRING is also based on a physical idea, or to be more precise, a physical 
fantasy. Imagine a spring with one end fixed to the centre of your computer 
screen and a ball attached to the other. If this were a normal spring, when you 
stretched it and let it go the ball would simply bounce back and forth. This 
however is an unusual spring, subject to some very mysterious forces which will 
cause the ball to move in a most peculiar manner — as you will soon see! 




V 




114 



10 RBI ########## S P r i n g #####»#### 

2W GRfiPHICS 24 

30 SETCOLOR 1,8., 15! COLOR 1 

40 SETCOLOR 2,RND(0.JSI6,6 

50 SETCOLOR 4#RND<8)*16#6 

88 RET'I starting pos. :j : spring constants 

70 K=RND< >#309. 5+4. 5 

88 V=RND< ;•¥ 1 85 .5+2.5 

90 H*=RND< >*50+5: OV=ftND< & )*50+5 

lay PLOT x,v 

110 REPI compute velocity & displacement 

120 U&4WK 159. S-XVftXs X^K+UX 

1 30 UV=uV+< 35. 5-V >sW- V=V+UV 

140 DRHHlU S/t 

150 SOTO 120 



115 



Apollo 2000 



Remember July 1969 .... that 'giant leap for mankind' when Neil Armstrong 
stepped onto the moon. When we recall the excitement felt throughout the 
world on that day it's hardly surprising that so many movies and computer 
games take space travel as their theme. 

In Apollo 2000 you control a space module on its journey to a planet. 
After the RUN command you can choose your destination — any of the nine 
planets in our solar system or the mysterious planet named RANDOM. Having 
made your choice the planet's landscape will appear on the screen, revealing the 
plateau on which you are to land. 

There is a choice of 2 levels of play. Level 1 is relatively simple. Level 2 is 
a bit more difficult because now your module is in orbit around the planet. 

Vertical movement is controlled by the keys 0-9, where gives no boost 
from your landing rockets, while horizontal movement is achieved by using the 
keys and . Once a key is pressed, your module will maintain its direction 
and velocity until you change their values. All relevant data are displayed on 
the screen. 

10 REf'l ######### flppollo 2000 ###»#»#»# 

20 01(1 C*< 20 >,S*< 10 >,PL$< 26; 

30 OPEN #2,4,0, "K: " 

40 SOTO 3200 

69 REf'l ### input ### 

100 IF FUEL<=0 THEN POKE 656,3: POKE 65,', 

21:? "TANK EIIPTv !! <ESC>L<2>3";:GhS=0:h 

6=0: G6=«: RETURN 

110 IF PEEkX 764 5=255 THEN 168 

120 GET #2,;<:*=X-4S 

130 IF rt>=0 HND X<=9 THEN H6=0:6HS=; ;: ;:6OT 

150 

1 40 h6= i 0*>; < >=:= 1 4 >-< ft= i 2 ) j 

150 6G=6hS+HBS< HG .:■ 

116 



180 IF SStcINT<=FUEL THEN RETURN 

1 70 TEK=FUEL-GG*InT: TEK=l+TEKyG8/IN7 

i 88 SflS= I'EKsGhS : H6= TEk*HG : GG=6hS+HBS'; HG ) 

188 RETURN 

199 REi'l ### computation ### 

200 8H=S6£SG : R=R0+H81 : PfiR= I NT 
21 tt uHU=Hy:GOSUB 800 

228 0OIS=OIS:80SU8 580 

230 0UEL=UEL : G0SU8 400 : UEl_=FUN 

240 0H6T=HGT : GOSUB 300!H8T=FUN 

250 r I i'IE=T I ITE+ 1 NT : FUEL=FUEL~86*IN r 

288 l'l=WGT+FuEL*SG 

270 RETURN 

299 REl'l ##* compute new he i 9th ### 

380 FUN=OHGT+PHR:4:£ UUEL+PhR:?:< (, < HU+OHU >'-2/ 

4- Jfl.-'R V2vR ) > 

310 IF 608=0 THEN RETURN 

320 FUN=FUN+£FF*8fiS^£W*< < PhR-IVGN >*L06< I'l 

y\ Pl-GNSPHR ) HPhR > 

330 RETURN 

399 REl'i ### compute new velocity ### 

400 FUN=oiEL+PfiR^ft*< < HU+OHU j--2-'4- JFVR ) 
410 IF 6RS=0 THEN RETURN 

42W FUN=FUN+EFF*8*S^6W*LCKi< IV< fl-GH+PHR J .:■ 
430 RETURN 

499 REM ### compute new distance ### 

500 DIS=GDIS+< OHU+HU V2£PftR: RETURN 

599 REH *## compute new h. velocity ### 

G80 IF H6=0 THEN RETURN 

6 1 HU<iHy+HEFF*H6*PttM1 : RETURN 

6:99 RED ### move ship ### 

-■00 x=lNTc BOSE+10+ODIS/HSC+0.5 ) 

710 V= I NTc HB-5-0HGT VSC+0 . 5 > 

72W UXOR 0: GOSUB 800 

730 X=INTC BflSE+10+DIS-'H9C+0. 5 ) 

748 IF X<5 OR X>154 THEN RETURN 

75ti V=INT< HB-5-HGT.-'SC:+0. 5 ) 

760 IF VK5 OR V>91 THEN RETURN 

778 COLOR: 2: GOSUB 800 

780 RETURN 

799 REl'l ### Plot ship ### 

117 



800 PLOT X-1,V-5:DRI*IT0 X+2.V-5 
818 PLOT X-2,V-4:DRftWTG X+2,V-4 
820 PLOT X-3,V-3:DRhWT0 X+3#V-3 
838 PLOT X,Y-2:DRftWTG X+3,V-2 
840 PLOT X,V-i:DRfiWTO X+3,V-1 
850 PLOT X-3,V-2:DR&WT0 X-3,V-1 
860 PLOT X-3,V:DRflWT0 X+3,V 
870 PLOT X-3,V+l:0RfiWTQ X+3,V+1 
888 PLOT X-4,V+5:PL0T X-5,V+5 
890 OR&WTO X-2,V+2:PL0T X+4,V+5 
300 PLOT X+5,V+5:DRHHT0 X+2,V+2 
910 RETURN 

999 REPI ### output values ### 

1000 POKE 656,0: POKE 657,11 
1010 ? C*iINT<UELSCl00V100; 

1020 POKE 657,29:? C**INT<FUEL*100 VI 08 

103O POKE 657,11:? C*#INT<H6T*i00 V180i 

1040 POKE 657,23:? C*iIN7< T I PIE* 100 t'180 

1050 POKE 657,11:? C*iINT<HU*100V100i 

1060 POKE 657,29:? C*i INK 1*1*100 VI 88 

1070 POKE 657*11:? C*iINT<DIS*188V180.S 

1080 POKE 657,29:? C*#8RS; 

1090 IF HG<0 THEN ? " <"i 

1100 IF HG>0 THEN ? " >" f 

1110 RETURN 

1193 REPI #** check position of ship ### 

1 200 X= I NK BHSE+ 1 0+D 1 S^HSC+0 . 5 ) 

1210 V=lNT<HB-5-H6VSC+0.5) 

1220 REPI * out Of range # 

1230 IF X<5 OR X>154 OR V<5 THEN 1400 

1240 REPI # beneath platform # 

1250 IF X<BHSE OR X>BftSE+20 THEN 1338 

1260 IF H6T<=0 THEN S*="Platf orm":60T0 1 

£80 

1270 IF UEL<0 OR QUEL>0 THEN 1330 

1288 INTl=0:lNT2=INT:EPS=1.0E-03 

1230 IF H6T<=8 THEN INT2=NLIL:60T0 1610 

1300 «DR=400: 60SU6 3100 

1310 PfiR=NUL:60SUB 308:H6T=FUN 

1320 IF H6T<=0 THEN INT2=NUL:60T0 1610 

1330 REPI * too low 

118 



1340 IF V>74 THEN S*="surfacC:eOT0 1880 

1358 REf'l # touching planet 

1360 LOCATE X-5,Y+5,C1 : LOCATE X+5,Y+5,C2 

1370 IF Cl=l OR C2=l THEN S*="surface":6 

OTO 1800 

1380 RETURN 

1399 REP) ##* out of range ### 

1408 ? "<ESC>C<2>3<tSC>C<CLEftR>3 

FLV1NG OUT OF RANGE" 

1410 ? " CGflUNICATIGNS LOST ! " 

1420 60SU8 700 

1430 SOUND 0,60,10,15:6OSUB 1500 

1440 SOUND 0,128,10,15:6OSU6 1508 

1450 SOUND 0,0,0,8 

1460 ? "<ESC>C=3 Try aoam ?"; 

1470 POKE 764,255: GET *2,X 

1488 IF X<>89 THEN 2230 

1498 POP :POP :60T0 3230 

1499 REH ### wait ##* 

1500 FOR M=l TO 70s NEXT Ms RETURN 
1599 REH »#* crash or land ? ### 
1608 INT1=0--INT2=INT 

1610 EPS=1.0E-03:ftDR=300:6OSU6 3100 
1620 PAR=NUL:6GSUB 400:UEL=FUN 
1630 TIHE=TIf1E+NUL 
1640 IF UEL<LANUEL THEN 1808 

1699 REfl ### land ! ! ### 

1700 GRAPHICS 0SSETCOLOR I»0#0sSETCOLOR 
2,11,7 

1710 ? "<ESOC< CLEAR >3<ESOC=3< ESC >C=J 
Vou are landed savely on ";PL$ 

1720 SUR=100:6OSUB 1768 

1730 ? "<ESC>C=3 No damage." 

1740 •? "<ESC>C=3 Vour mark for this lan 

ding:"; INK 5+UEL/2 >+5 

1758 GOSUB 2200: RETURN 

1768 ? "<ESC>C=3 Speed: " $INT<UEL*1©0 V 

T i me : » } INT< TI FE* 1 88 V 

Survived crew: ";SUR;" 



119 



188; :? 


" (tL^S. " 


1778 ? 


"<ESC>t=3 


188;:? 




1788 ? 


"<ESC>C=3 


v.* 





1790 RETURN 

1799 REfl #** crash ! ! #*# 

1808 GOSUB ?0H 

1810 IF X<5 THEN X=5 

1820 IF X>154 THEN X=154 

1830 IF V<5 THEN V=5 

1840 IF V>74 THEN V=74 

1850 FOR L=15 TO STEP -1 

I860 SOUND 0, 30, 9, L: SOUND 2,12O,0,L 

1870 SOUND 2,120,0,L:SOUNO 3,140,0,L 

1880 COLOR 0: GOSUB 2100 

1890 COLOR 2: GOSUB 2100 

1900 NEXT L 

1910 GRAPHICS 

1920 SETCOLOR 1,0,0:SETCOlOR 2,3,7 

1930 ? "<ESC>C<CLE«R>i<ESC>C=3<ESC)E=3 

You are crashed on the ";S$ 

1940 ? "<ESC)E=3 on planet ";PL$ 

1950 SUR=0:1F HBS<UELX30 THEN SUR=10O-I 

NKHBS<UEL>/0.3.) 

i960 GOSUB 1760 

1970 ? "<ESOL=3 Damage: "; 

1980 IF UEL<-15 THEN ? "un"; 

1990 ? "reparable. " 

2000 ? "<ESC>[=J Vou created a crater, 

depth: " ; INT< 1 . 56#HBS< UEL > V10; " A. " 

2010 GOSUB 2200: RETURN 

2100 FOR 1=0 TO 5 

2118 PLOT X-I,Y-l:PLOT X,V-I 

2120 PLOT X+l,V-l:PLOT X+I,V 

2130 PLOT X+I,V+I:PLOT X,V+I 

2140 PLOT X-I,V+I:PLOT X-I,V 

2150 NEXT I : RETURN 

2199 REfl ### again ? ### 

2200 ? "<ESC>C=3<ESl:>C=3<ESC:>C=J<ESl:>C=3 
Do you want ariother time ?"; 

2210 POKE 7'64,255:6ET #2,X 

2220 IF X=89 THEN RUN 

2238 POKE 82,2:6RflPHICS 8 

2240 END 

2299 REJ1 *#» choose planet *#* 

120 



2380 GRAPHICS 2JSETC0L0R 2,0,8 

2310 ? #6;"vgur mssicw is to" 

2320 ? #6; "LAND safely ON A PLANET." 

2330 ? #6; "VOU CAN FIRE FUEL TO"; 

2340 ? #6; "CONTROL THE LANDING." 

2350 ? #6; "0-3 VERTICAL AND" 

2360 ? #6;"< OR > HORIZONTAL." 

2370 ? *6:? #6; "WHICH PLANET ?»j 

2380 ? "0:RANDOf] l:ri£RCURIUS 2: MENUS 

U 

2390 ? "3: EARTH 4: TOON 5: OARS" 
2400 ? "6: JUPITER ?:SATURNUS 8:URANU 

2410 ? "3:NEPTUNUS Tf7*i 

2420 GET #2,PL:PL=PL-48 

2430 IF PL=0 THEN PL=INT< 9*RNCK 8>+l ) 

2440 FOR 1=1 TO PL 

2450 READ PL*,COLOR,O1,R8,F0,H0,EFF,HEFF 

2460 NEXT I 

2470 RETURN 

2439 REO ### planet data #*# 

2500 DATA nERCURIUS,l,3.2SE23,2.24E6,lS0 

,350,10000,500000 

2510 DATA UENUS,2,4.87E24,6.05E6,200,500 

,10000,500000 

2520 DATA EARTH,3,5.S7E24,e.37E6,200,680 

,10000,500000 

2530 DATA TOON,5,7.35E22,3.8E5,200,500,3 

0000,390000 

2540 DATA r)ARS,3,6.3SE23,3.4E6, 200, 500,1 

0000*500000 

255H DATA .JUPITER, 1 1 ,1.3E27,7. 14E? ,200,2 

500 , 20000 , 5000000 

2560 DATA SATURNUS,4,5.63E26,6E7,200,200 

, 1 0000 , 2000000 

2570 DATA URANUS, 0,8. ?2E25,2.6E7, 160,400 

,10000,1000000 

2588 DATA NEPTUNUS, 13, 1E26,2.42E7, 180,28 

0,1 0000 , 1 000000 

25SS REO #*# initialize I ### 

26O0 WGT=2500:SG=10:LANUEL=-10 

2618 C*=" <ESC.>C+3<ESC>C+3<ESC:.> 

t+JK ESC >L+3< ESOC+JK ESC >C+3< ESC >L+1< ESC > 

121 



C+3< ESC >C+ 1< ESC >C+D " 

2628 J=6 . 67E- 1 1 : Jf»=J*fl 1 

2630 RETURN 

2699 REP1 ### Plot planet ### 

2780 GRAPHICS 7:SETCGLGR 0,COLOR,6:SETCO 
LOR 1,10,7:SETCOLOR 2,1,8 

2710 BflSE= I NT< RNCK >* 1 30 )+5 

2^20 H=INT<RNEK0>*20>+59 

2730 COLOR l:Xl=0:X2=6fiSE-l:SOSU8 2836 

2740 C0L=2:HB=H:I=H:K=H+2 

2750 COLOR COL: PLOT EWSE+20,K 

2760 DRHNTO BOSE+20,I:DRflWTO BhSE,I 

2770 POSITION BflSE,K 

2780 POKE 765,COL:XIO 18,#6,0,0,"S: " 

2790 IF C0L=2 AND h<77 THEN C0L=lSl=H+3s 

K=79:60T0 2750 

2800 X1=BASE+21:X2=15S 

2810 COLOR l:60SUB 2830 

2820 RETURN 

2830 FOR I=X1 TO X2 

2840 PLOT I,H:DRflWTO 1,79 

2850 IF H>79 THEN H=78:60T0 2880 

2860 IF H<59 THEN H=60:6OTO 2880 

2870 H=H+ INK RNCK 0>*3>-l 

2880 NEXT I 

2890 RETURN 

2899 RED #t# initialize H ### 

2900 TIITE=0: INT=0. 5: GfiS=0: H8=0: FUEL=F0 
2910 UEL=0:OUEL=0:H6T=H0:OH6T=H0 
2920 R=R0+H6T:n=W6T+FUEL*SG 

2930 ? "<ESC>C<CLEftR>3 ***** "*PL*i 

*****" 
2940 ? "<ESC>C=3 LEUEL <1 OR 2>: ?"; 

2950 6ET #2,LEU:IF LEU<49 OR LEU>51 THEN 

2930 
2960 HU=SQRtJJt4=!>*<LEU=50>:OHU=HU 
2970 HSC=5*3QR<JIVR>,'160 
2980 DIS=-HSCt<BNSE+5>:0OIS=OIS 
2990 SC=H6TAHB-10> 
3000 POKE 82,0: POKE 752,1 
3010 ? "<ESC>C<CLEftR>3Speed <U. >1 
Fuel : " 

122 



3020 ? "Height : fitus 
3&30 ? "Speed <H. >: Weight 
3040 ? "Distance : Trottle 
3050 RETURN 

3099 REfl »*# root finder #*# 

3100 NUL=1E+S8 

3110 PftR=I NT 1: GOSUB HDR:FUN1=FUN 

3120 PflR=INT2: GOSUB HDR:FUN2=FUN 

3130 NULO=HUL 

3140 NU.=INT1-<INT1-INT2>*FUN1AFUN1-FUN 

2> 

3150 PBR=NUL: GOSUB HDR 

3160 IF fiBSCNUL-NULOXEPS THEN RETURN 

3170 IF FUN*FUN1<0 THEN I NT2=NUL : FUN2=FU 

N:i50T0 3130 

3180 INT1=NUL:FUN1=FUN:G0T0 3130 

3199 REM ##### «air. program ****# 

3200 GOSUB 2300:REH choose planet * 
3210 60SUB 2600: REfl initialize I # 
3220 GOSUB 2700: REH plot planet * 
3230 GOSUB 2900:REn initialize II # 
3240 GOSUB 700:R£H move ship # 
3250 GOSUB 100: RED input # 
3260 GOSUB 200:RE(1 computation * 
3270 GOSUB 1200: RED check pos. * 
32S0 GOSUB 1000: REfl output values # 
3290 GOTO 3240 



123 



At the Market 



Have you ever wandered through a market and been amazed at the speed with 
which the salesmen can add up a list of prices? Play this game with your family 
and find out how good a market trader you would make. 

You will see pairs of numbers of increasing length which you have to add 
up. You will soon find out that this isn't as easy as it sounds. To see why, 
consider the sum 

75856 
+ 37637 

Normally you would add the numbers in the right hand column first, then the 
column next to it, and so on. With the computer, however, you must enter the 
answer starting with the left hand column. It is this difference that makes the 
game so tricky. 




124 



How many numbers can you add correctly within the time limit of about 
one minute? Can you beat our record of eight? 



1@ RED #*##ff*##w ftt. Tf« Oarfcet. ##»#»###* 

2@ Din ft$< 15; 1 

30 tf=i:pOKE 1S#0!POKE 20*0 

4@ T i = I NT< RM3K >* i u-'-P ? 

5@ IF TKiW-'^H-l J THEN 48 

80 T2= I NIX HULK j$ l y-+t ) 

7'0 IF r2<10--<P-l > THEN 50 

80 ? :? Ti:? T2#" +" 

90 FOR B=0 TO fis PRINT "-";:NEXT B 

100 ? s? "ftisfljer :">: INPUT hnS 

110 IF HNS=T1+T2 THEN 14W 

120 ? "Ht^oriQj it- is : ">Tl+T2 

1 30 h=h- i : GOTO 1 40 

140 IF PEEK<28>+P£El«i3>*256<3880 THEN ft 

=ft+lsSOTQ 40 

150 T1=1NT< RND 1 ; »10^pi :>■ IF T 1<10"< ft-i ) T 

HEN 40 

lb0 "■' : 'i'' '"r'our score is : " tft 

165 ? "Job specification: " i 

170 FOR 1=1 TO ft:REftD R*!N£XT Is? ft* 

180 ? " T i «e : " s IMT< < PEEK/ 20 HPEEKX 1 3 >*2 

56 J ■■'0 . 6 V 1 00 * " se - onds " 

190 •"•• "Do uou want to pi ay again ";:INPU 

T fi*' 

200 IF ft*-;i J .l>="V" Then Run 

210 END 

220 UHTft fry 39am,SchoolK id^paper-boy^u 

ierfc J ,Huto dealer 

230 UHTft 6roKer,0 i rector, 1 i magna te, fl 1 1 

1 i ona i re , Nor id c damp i on 



125 



Fallout 



At the start of this simple but absorbing game you will see eight horizontal bars 
with gaps in them. Above the bars are eight checkers which can fall through the 
gaps. In this example 



© © © © © © 



checker 2 has already fallen into a gap. The object of the game is to get all 
eight checkers through the bars. You can do this by moving the bars to line up 
the gaps for the checkers to fall through. 

To move a particular bar enter a command of the form 



BDS 



where 



B is the number of the bar (the bars are numbered from 1 at the top to 8 
at the bottom) 

126 



D is the direction you wish to move it (L for left, R for right) and 

S is the number of steps the bar has to be shifted. 

For instance 

3R12 

moves bar 3, 12 steps to the right. This might sound like a very simple game 
but when you actually start playing it you will find that it provides quite a stiff 
test of your ability to think logically. 

10 Rtl'l ######### Fall o u t ######### 
20 DIP) G$U53 j,H*( 153J,HU*'; I?) 
30 DIl'l BL*< 1>*BPI*<1 >*K8;> 
40 POKE 752,1 
50 GOTO 800 

99 REfl ##* initialize ### 

100 BL*=" ":BH*="£' £" 

1 1 &=&L$: 6$< 1 7 ;'=BL*: 6*< 2 >=G* 

1 20 G$< 1 8 )=Bftr : 6*< 1 53 )=BH$ : S*< 1 9 >=&$(. 1 9 ) 

130 FOR V=l TO 8 

140 FOR 6=1 TO 4 

1 50 K= 1 NT< RNCK 6 >*1 7+ 1 > 

1 60 Gt< V* 1 7+X , V* 1 ?+X >= " " 

170 NEXT B 

1 80 I < V >=2t'i' : G$< 1 < V ),KV) >=S1 R*< V ; 

190 NEXT V 

200 RETURN 

299 Rtl'l ### draw screen ### 

380 H$=G* 

310 ? "<ESC>t<L:LEHK>J<tSC>t=JSC:ORE: 

TURN: " 
320 POSITION 18*15? S£; 
330 POSITION 26,1 :? TU; 
340 POSITION 2,5 
350 FOR B=0 TO 8 

127 




see ? &*" "#H*<B*i?+i#<B+i>*i?> 

370 NEXT B 

388 RETURN 

399 REN ### input- ##* 

480 POSITION 10 , 22!? 'SESCxSHIFTxBHCK 

S>ENT£R i'lOUE "; 

410 INPUT RO* 

420 RC=ftSC<; RO*< i ,i > J-4S 

430 IF RC<1 OR ROS THEN 400 

440 0I=<R0$<2,2>="R" ?-'■. R0*< 2,2>="L" ) 

450 IF 01=0 THEN 480 

460 T I =Uftl_< R0¥< 3 > > 

470 IF TK1 THEN 400 

480 RETURN 

499 REI'I ### -iroP checkers ### 

500 FOR B=l TO 8 

510 I=KB>:J=I+ir-':IF KB THEN 630 

520 IF H*<I,IJ=BL* OR H$t, 1 , i ?=Bti$ OR H*( 

J#J)OBL$ THEN 630 

530 I< 6 >=J: H*< J* J )=HK I j. I >!H*< I ..I J=BL$ 

535 P1I=INT<< 1-1 V17'>s(lJ=INT<<J-l Vi?> 

540 ni=INI\a-l Vl?>:PU=lNK< J-l VI'? > 



128 



55a POSITION 3+J-17*l v U,ru+5:? HJ-\J,.J>i 

see position 3+i-i?*oij.rti+5!? bl*j 

578 IF Jil'S? THEN 620 
syy SC=SC+Uffl-<H*< JpvD'J 

59@ I < B >=- 1 : H*t. J , J >=BL* 

600 POSITION 10,1s? SCi 

610 POSITION 3+J-i?*fi.J J ri.J+5:' 7 " Bi_$ 

620 B=8 

838 NEXT B 

640 RETURN 

633 REli ### sh i ft- bar ##» 

700 RO$=H*i i7*RC+l,l7*<RC+l J; 

710 IF 01=1 THEN H*<17#RC+i*17*RC+i;>=ftQ$ 

■: 17}:H*< i7:$:RC+2*17*.f fiC+1 > :-=R0$< 1,16)5601 

738 

720 H$( 1 ?#< RC+ 1 > r 1 7*< RC+ 1 .) 5=K0¥-: 1 j 1 > s H*< 

1 7T-RC+1 , 1 ?*< RC+l >-l >=RG*< 2 > 

730 POSITION 2.,5+RC:"'' RC>" "ifWX 1?*RC+1* 

l?«<RC+i ;v 

740 FOR B=l TO 8!R=INT<< KB>-1 >/l?) 

75« IF RCOR THEN 788 

760 IF KB>=ftC* 17+8*0 1+3 THEN 1 < 8 >=RC* 1 7 

-9*01+9 

770 KB:i=I<8J+0l 

788 NEST B 

790 RETURN 

793 REIT ##*#* main program ###*# 

888 GOSOB 1 80 : REI'i i n 1 1 i al i ze * 

810 GOSOB 308:REfi draw screen # 

.328 RC=1! GOSOB 588: REIT drop cht-CKers# 

838 GOSOB 4+10: REI'I input # 

840 FOR DU=1 TO TI 

850 GOSOB 788: REI'I ai i ft, bar # 

868 GOSOB 588: REI'i drop cheCKers # 

878 NT=NT+l: POSIT ION 26,1:? NTi 

888 NEXT DO 

830 IF SC<36 THEN 838 

900 SC=0: NT=8 

910 POSITION 2,22:^ "<ESC><SHIFT><BHCK S 

>Once more "; 

920 INPUT R0*:IF R0*< 1 # 1 X > U V THEN 6RHP 

HICS 0:END 

129 



938 ? *<ESCXSHIFTXBBCK S>Sa«*e Situatio 

n ";: INPUT Rus: 

948 IF R0*<1#1X>' , V* THEN Run 

95-y H*=6*sS0T0 810 

1499 HEl'l ##### mam prograsi ##### 

1500 GOSUB 100:REfl initialize # 
1518 80SU6 200: REH ara^ screen # 
1515 RC=i:8QSUB 308:REi'i 

1528 60SU8 600! REH input # 

1538 FOR 0U=1 TO TJ 

1548 GOSUB 400! REM shift 

1542 GOSUB 300! RER drop 

1558 NT=NT+l: POSIT ION 26, i:? NT; 

1568 ICXT DU 

1578 IF SC<36 THEN 528 

15S8 END 



130 



Ship's Attack 



First, let's describe this game as realistically as possible. In the lower half of the 
screen is a shape like this: 



Little squares fall down from the top of the screen. You must move the shape 
using the joystick or the cursor controls . 



and 



to stop the squares hitting it. If that sounds dull what about this . . . 

You are captain of one of the finest spaceships in the universe. As you 
cruise majestically through the Milky Way you can't help feeling proud of the 
magnificent vessel under your command. Then just as you are nearing the 
harbour and the end of your voyage is in sight, disaster strikes — 

A FLYING SAUCER ATTACK! 

How can you escape these unfriendly invaders from across the universe? Why 
not try your 

SUPER ATOMIC ESCAPE MOTOR? 

The more flying saucers you avoid, the more points you get. That sounds 
better, doesn't it? Anyway, the game is fast, simple and great fun to play, and 
that is all that matters. 

131 




132 



IB REM ###*#### Ships'* fittacK #####*### 

20 Difi SH*<3)j.NS*t3>#faj*<l>*NB*U) 

30 OPEN ^*4j«#"K:" 

40 SOTO 500 

99 REI'I ### initialization ### 

1 m SH*= " G CKUUfc " : NS$= " " : BU?= " 1 11 " : NB 

$=•■ » 

110 Fti=0:GPL=S:PL=10:BV=23 
120 ? "<ESC>C<CLEflR>3<E£C>C=3Em«r level 
: "j: INPUT LE 

130 GRAPHICS 1?!P0KE 756,226 

140 SETCOLOR 0*0/0 

150 ? #6;" eSHIPSfi GBTTflCKG" 

160 POSITION PL- 1,23:? #6;SHS; 

178 RETURN 

188 REfl ##* move ship #»####*# 

£00 OPL=Pl:k=0 

£10 IF PEEK*; 764)0255 T'hEn GET #2,K 

220 PL=PL-K K=42 JK K=43 >K ST 1 CK< ;■='.'' X ST 

ICK<0>=11 ) 

230 IF PL=0PL (HEN RETURN 

240 POSITION 0PL-l,23:? #6iNS*; 

250 IF PL<1 THEN F'L=1 

260 IF PL>18 THEN Pl_=l8 

270 POSITION PL-1#23S"? »6iSH*i 

28u RETURN 

298 REPi #»# drop bullet ##» 

300 POSITION BX,6y:? #6;NBS; 

310 6V=BV+1+LE 

320 IF BV<23.5 THEN 390 

330 IF BBS<BX-PL»1 THEN 340 

335 FOR H=56 TO 250: SOUND O*W*0#l5!NEX1 

H : SOUND *0* , : ? " < ESC >E< CLEAR XJ< ESC >C= 

3VOU have ";PO-i;" points. ": END 

340 8X=PL+INT< < 3-LE >*< RNCK >*3-l > ) 

350 IF BX<1 THEN Bx=l 

360 IF BX>18 THEN Bx=l8 

370 BV=LE:P0=P0+1 

360 FOR w=100 TO 50 STEP -3:S0UNQ &*H*10 

,15: NEXT W: SOUND 0,0,0,0 

380 POSITION BX*BVS? #6; 60*; 

400 RETURN 

133 



499 REfl #»### mam program ##### 
5«tf GOSUB 1 W : REfl i n 1 1, i a 1 1 zax. i on # 
51a GOSUB 2m:REn move ship # 

526 GOSUB 3Ufci:REf'i drop tuilet. # 

536 GOTO 51 a 



134 



Mini Mancala 



MINI MANCALA is based on an old Arabian game. It is played by moving stones 
between cups. There are four cups: A and B are the computer's, and C and D 
are yours. At the start of the game there are two stones in each cup. 





A (computer) 



B (computer) 





C (you) 



D (you) 



In turn, the players take the stones from one of their own cups and distribute 
them counterclockwise to the other three cups, one stone per cup. For instance 
you might choose to move the stones from cup D like this: 



135 




A (computer) 




C (you) 





B (computer) 



anticlockwise 




D (you) 



After this move cup D is empty. In fact, there will always be at least one empty 
cup, because during each move stones cannot be put back into the cup from 
which they were taken. 

To win the game you must get all the stones into your own cups. 

On the computer, the cups are represented by squares with numbers on 
them indicating the number of stones they contain. You can choose the level of 
difficulty you prefer, 1, 2, or 3 (1 being the easiest), and who has the first 
move. The computer will ask which of your squares you wish to move the 
stones from and will tell you what its own move is. The position of the stones 
on the board is displayed after each move. 

You may be surprised that this complicated game can be described in such 
a short program. The diagram shows all the possible moves, and is an excellent 
example of how a strategic game can be represented schematically. 

This game was created by C. Freeling. 



136 




137 



16 RED #########_ Piini-l'jaric -a i a ###»#»#»* 
20 Did f'K 1,1 >,U3,1 > 
30 OPEN #2*4,0, "K: " 
40 SOTO 700 

99 RBI ### irntiai.ze ### 

100 FOR 1=0 TO l 

116 (K8*D=2:IKi*l >-> 
120 FOR L=0 TO 3 
130 REHD s:L(UI)=X 
140 NEXT L 
150 NEXT 1 

160 ONTO 0,1,1,0,0,0,1,1 

170 RETURN 

199 REii ##* display beared ### 

200 GRAPHICS 18 

210 POSITION 4,0:? #t;;"miniLi'Qmancala" 

220 ? #6:? #6:? #6;" 6fl B8" 

230 ? #6;" H'! 62 6!G 26! 8" 

235 ? #6;" 6! Ml" 

240 ? #6;" ii'!G2 t'lli' 26(6" 

250 ? #6;" 6C Dfc" 

260 RETURN 

299 REI'I ### input ### 

300 POSITION 0,10 

310 ? #e^"enouE stones frlu-i cup <c,d> *e 

li . 

320 POKE 764,256: GET #2,X 

330 IF X=S7 HND FK1#0»0 THEN L=i:? #b;U 

HRS<X>: RETURN 

340 IF X=68 HNLi I'K 1,1 ;'.>0 THEN L=2:? #6iC 

HR*< X >: RETURN 

350 SOUND 0,20,10,15 

360 FOR T=l TO 180: NEXT T 

370 SOUND 0,H,0,0 

380 GOTO 300 

339 REd ### computer's turn ### 

408 POSITION 0,10:? #6; "now itfGJs my tu 

rnCP.3 

410 FUR N=W TO 500: NEXT H 

420 Q=FK O , U )* 1 000+f'K , 1)X 1 80+CK 1 , & >% 1 W+l'l 

< 1 , 1 > 

430 L=3 

138 



448 IF i'Ka.BXHJ HNG <L£U<3 RND KNCKU.^Lh 
U<8.4 OR fK8#l>=8 OR 8=1438 OR 0=1340 OR 

Q=6118 OR 0=1160) THbN L=8 
45ft POSITION 0*1@!? #6* "61 PIQUE STONES F 
ROri CUP 6"#CHR*<65+<L=3))i 
460 RETURN 

439 REPI ### spread stones *#* 
500 S=LX L »@ >! H=LX L* 1 ) 
510 IF fKG,H.J=8 THEN RETURN 
520 L=L+i:lF L>3 THEN L=L-4 
530 I=L<L,8>:J=L';L#1> 
540 iF 1=6 HNO 0=H THEN 520 
550 60SUB 608! GOTO 518 
593 REfl *## move one stone ##» 
688 PK 6*H )=fl< 6,H )-l : I'K 1 «J J=rl< I »J HI 
610 POSITION 7+4+H, 4+2*6s? #6*fKG»H> 
620 POSITION ?+4*J#4+2*l!? #G;n< I ,J > 
630 FOR H=l TO 280! NEXT H 
640 RETURN 

£39 REC1 ##### stain program ***** 
788 S0SU8 1O0:6OSUB 288 
710 ? #6:? #6:? #6j"EMTER LEUEL <1-3X? m 
728 GET $2,> ; ;:lEu=;«;-4S 
738 IF U&K1 OR LEU>3 THEN 720 
740 POSITION 8,10:? #6;"HH0 STARTS? VOO 
OR ('IE ?" 

750 GET #2,Xi IF *=89 THtN 798 
760 80SUB 30O:REii input * 

778 SOSUB 580: REM spread stones # 
780 IF nu.l>=S THEN POSITION 8*9! ? #6;" 
you hi in": GOTO 838 

798 80SUB 488:REfl computer's turn # 
888 G0SU6 588: RBI spread stones # 
818 IF IK8#8>=8 THEN POSITION 8,3:' #6i" 
I ui in": GOTO 838 
628 GOTO 768 
838 ? #6; "00 VOL) WHNl TO PLHV NGHlN ? 

848 POKE 764,255: GET #2 J .>=;: IF X=8S THEN R 
UN 

858 END 



139 



Stop It! 



Although this is only a short program it gives rise to a fast and exciting game. 
The screen looks like this 



H 




The square on the left has a letter on it. When it moves across the screen you 
must try and stop it in the region bearing the same letter by pressing any key. 
At the start of the game the computer requests a level of difficulty (1 is the 
easiest, 2 is harder and 3 is the most difficult) and asks you how many times 
you want to play. You'll be shown your score at the end, for instance 

Your score is out of 10 (0%) 

Never mind, better luck next time! 



140 



18 REl'l ######### S X, Q P 1 t ######### 

20 D I fl UUfi. 1 ;■ 

30 '<■ "<£SC>ta:LEHR>J<E£C.;C; = >Jtnter_ieve' 

I of d i f f i cul ty >: l -3 ;■:";: I NPul D 1 : 1 =25- 

6*0 1 

48 ? "<£SC>L<=>JEni,er number of turns. :" 

;: INPUT NT 

50 6RWPHICS lSsSOSUB && 

60 SETOOLOR 8,4,6 _ 

70 SETOOLOR 1,8, IS 

88 SETC0L0R 2,12,18 

98 POSITION 11,8:? #6* "eCaCbCcCdS" 

188 FOR RO=l TO 11 

118 POSITION ll,RO:? #6i"0L t C tfi" 

128 NEXT RO 

138 TU=T0+1 

1 4gi C0= I NT< RND< 8 >*4 .) : BU*=CHR3K 00+65+32 .> 

158 R0=l+2*lNkfiND': 8;'*6.:' 

155 POKE 764*255 

168 FOR C=8 TO 18 

170 POSIT ION CRO:? #6," " ;BU$j 

188 FOR DE=1 TO DTsNEXT DE 

190 IF PEEK< 764 X >255 OR PTRI6< 1 >=0 OR S 

TRI6<0)=0 THEN C=C+lJ<3QTQ 218 

288 NEXT C 

218 POSITION CRQ:? #6;" "; 

215 POSITION ll,RO:? #e,"GL £ ill C6" 

£28 IF CO 12+2*00 THEN T=288:GOSoe 588 :G 

OTO 258 

238 T=20:GOSUB 580:HI=HI+1 

248 POSITION 8,0:? #6;HI; 

258 IF TLKNT THEN 130 

260 GRAPHICS 8: POSIT I UN 5,5 

278 t "your score is ";Hl;" out of "iNT* 

" <. u ilHT<Hl/HTtl&&>i'"4>" 

288 END 

588 SOUND U,T,10,15 

518 FOR DE=1 TO 5*0T:NEX! DE 
528 SOUND 8,0,0,0 
530 RETURN 

589 REIT ### change characterset, ### 
600 TOP=PEEK< 10b.:-y 

141 



618 POKE 204#TOP:POKE 286,224 

628 FOR: X=1536 TO 1555 

638 READ U:POKE X,U 

648 NEXT X 

658 Q=USR< 1536 ) 

668 DHTH 1 84 , 1 62 , 4 , 1 68 , 8 , 1 77 , 285 , 1 45 , 28-2 

, 288 , 288 * 243 , 238 , 286 , 238 , 284 , 282 , 288 , 242 

,96 

678 RHplSET=T0P*25e 

688 FOR X=RHf'ISET+59£8 TO KH(1SET+59*8+7 

698 POKE X,255 

788 NEXT X 

718 POKE 756, TOP 

728 RETURN 



142 



The Swedish Popsong 

A theme con variatone is a tune that, although it is based on one that has been 
heard before, has its own mood and identity. This game could be considered as 
a theme con variatone as it has some similarities with another game in this 
book, but presents its own unique challenge to the solver. 

You will see 16 fields filled with a random arrangement of As and Bs e.g. 



B 


A 


B 


A 


A 


A 


A 


B 


A 


B 


A 


B 


B 


B 


A 


B 



When you indicate one of the fields (enter ROW and COLUMN) all the letters 
on the horizontal and vertical rows through that field will be altered so that all 
the As become Bs and vice versa. Your aim is to end up with a screen which 

143 



looks like this: 



A 


B 


B 


A 


A 


B 


B 


A 


A 


B 


B 


A 


A 


B 


B 


A 



10 REf'l #####* BaBa ##*### 

20 01 ft B<4*4) 

38 SRfiPHlCS IS 

40 OPEN #2#4*&#"K! " 

50 SOTO 500 

99 REf'l ### initialize #*# 

100 FOR R=l TO 4 
110 FOR C=l TO 4 




144 



1 28 B< R , C >= I NT < 2*RnLk is :> :> 

130 NEXT C 

140 NEXT R 

150 ':- #6;" gthe Swedish popsonQli'" 

lfcy POSITION 8,2:? #6* "1234" 

l,y POSITION 9,3:? #6iCHR*<i59) 

180 RE 1 URN 

199 REl'l #»* draw screen ### 

£00 FOR R=l TO 4 

£10 POSITION 6#3+R5? #6;R;" "; 

220 FOR C=l Til 4 

£30 IF 6<R,C.> THEN ? #&;"&" i ■ SOTO £50 

240 ? #8i"a*j 

£50 NEXT C 

£B0 NEXT R 

£70 RETURN 

233 REIT *## 'Set, i nput, and flip ### 

300 POSITION £,9:? #6; "from P" 

310 GET #2,R:R=K-4S 

320 IF R<1 OR R>4 THEN 300 

330 FOR 0=1 TO 4 

340 KR*C>= NOT B<R,C) 

350 NEXT C 

360 POSITION 2,3:? #6i"ecolumnt"' 

3?'0 GET #2,C:C=C-48 

3S0 IF C<1 OR C>4 THEN 360 

330 B<R*C>= NOT B<R,C'.> 

400 FOR R=l TO 4 

410 B<R,C>= NOT B<R,C) 

420 NEXT R 

430 RETURN 

433 REl'l ##### <nain program ##### 

500 OOSUB 100:REfl initialize # 

510 60SUB 20O: REn draw screen # 

520 60SUB 300: RED >npLrt & UJrn # 

530 GOTO 510 



145 



Vowels and Consonants 

This competition game can be played by the whole family. Unlike most other 
computer games, it does not involve numbers or arithmetic. At the start of the 
game enter the number of players, and then take turns to play. The computer 
will give you seven letters: when it asks you 

Vowel or Consonant (V,Q? 

enter V for a vowel or C for a consonant. When you have your seven letters the 
computer challenges you to make as long a word as possible out of them, using 
each letter once only. There is a time limit, shown on a clock on the screen. It 
is amazing how addictive a simple game like this can become. Try it and see! 

10 REfl ##### Uowels fin<a consonants ##### 

20 OPEN #2,4,8, "k: " 

3W ? 'H ESC >L< CLEAR >3< ESC .^C^/JNumber of 

Players :";: INPUT NP 

48 DlCI P0< NP },CHS$< 21 j r CH$K 1 >,LE*'; 7 ) 

56 FOR P=l TO NP:PO<P>=0:nEXI P 

60 80T0 900 

99 REl'l ### Initialize screen ### 

100 GRAPHICS 18 

1 10 ? #6; "PLR. : " : ? #6; "PTS. : " 

120 FOR P=l TO NP 

130 POSITION 4+3£P,0:''- #6;P 

140 POSITION 3+3#P*i 

150 IF PCKPX10 THEN ? #6#" "; 

ISO Y #S;POf. P.) 

170 NEXT P 

180 POSITION 0,3:? #6,-"ujrn of piaye-rLZa 

"iCHR*CPL+lK;j 
190 POSITION 0,5: ? ftF^'iivouiel or consona 
nt LHlvLLlc £ 1 3£ " ; CHR $(. 1 59 > i 
200 POSITION 0,11 
210 ? *S;"G:tirae leftLZJ sectN3G"j 

146 




33y 

400 

410 
420 
430 
440 
458 



470 
480 
490 
500 

510 
520 
599 

600 



8,11:? #6;"ti 
0,250, 10, 15: P 



### 



220 POKE 28,0: POKE 1 9,0: POKE 18,8 

238 RETURN 

299 REM *## ClOCK ### 

308 TI=<PEEK< 18;*65536+PEEKC 19>*256+PEEK 

< 28 > >y'6H 

310 POSITION 11,11 

328 ? #S#60-INT<TI*18V10 

338 IF TI>68 THEN POSITION 

me- is up! pts, ";: SOUND 

OP : RETURN 

340 RETURN 

REf'l ### choose characters 

FOR DU=1 TO ? 

SOSUB 308 

IF PEEK<? , e4:)=255 THEN 418 

SET #2, IN 

Ih IN=86 THEN CHSS^'HEIGU^GGTO 478 

IF IN=67 THEN CHS*="BCDFGHJKLPINF'i3RST 
UWXV2":GGT0 478 
488 GOTO 418 

I N= I NT< RNCK 8 )*LEN<; CHS* >+ 1 > 

LE$< DU >=CHS$<; I N , I N > 

POSITION 5+2*DLl,G 

? #6iCHP^(HSC(LE*<;DU);'+32.> 

NEXT DU 

RETURN 

REPI ### input word ### 

lE=w 



147 



61 a 60SLIB -300 

620 IF PEEK<764>=255 THEN 610 

633 GET #2, IN 

640 IF IN=155 THEN RETURN 

650 IF IN=126 AND LE>8 THEN POSITION LE- 

U8:? #6;" "*:LE=t£-l:GOTO 618 

660 IF IN<6S OR IN>98 THEN 610 

670 LE=LE+ 1 : CHS*! LE >=CHR*<; I N > 

680 POSITION L_E-1*8:? #6*CHR*< IN+168) 

6S0 SOTO 610 

699 KEf't ### compute points ### 

700 IF LE=0 OR TI>60 THEN RETURN 
710 FOR CO=l TO LE 

720 FOR C=l TO 7 

?38 IF OHS$<CO*CO>=LE*<C*C;> THEN Lt*<C*C 

)="<ESC><BNCK S>80T0 ?80" 

740 NEXT C 

750 POSITION 0*3: SOUND 0,200,10*15 

788 ? #6; "wrong letters used CN3" 

770 RETURN 

780 NEXT CO 

790 PO< PL >=F'0< PL >+LE 

800 POSITION 8*9 

818 IF LE<7 THEN ? #6i H 9oodi;0 "j: SOUND 

* 30 * 1 * 1 5 : 60 1 830 

S20 ? #€:*"cccelentoa "*:SOUND 0*18*10*1 

838 ? fft:*CHR*<LE+16>*" PomtsCNH" 

840 RETURN 

899 REI'l ##### mam program ##### 

980 FOR PL=1 TO NP 

910 SOSUB 180: REP) initialize screen # 

928 SOSUB 400! RBI choose characters # 

930 POSITION 0*5 

940 ? #S*"iiflHKE H WORD OUT OF THESES"* 

950 SOSUB 680! REH input word # 

968 SOSUB 708: FECI compute points # 

978 FOR N=l TO 508:NEXJ H 

988 SOUND 0*0*0*8 

988 NEXT PL 

1800 60T0 988 



148 



Astrology 



This program is based on a study made by the Dutch physicist and astrologer 
Dr. Ir. J. Van Slooten. He was a research worker at Philips laboratories who 
spent all his free time on astrology. He developed a theory that the phase of the 
moon at the time of birth was a very important astrological influence on a 
person's character. After studying the lives of hundreds of people he con- 
cluded, "... that the moon phase forecasts the extent to which the spiritual 
and emotional life, especially with respect to a person's social environment, will 
develop and furthermore the role he or she will play in our society ..." 

The diagram shows the cycle of the moon's phases. As there are three phases, 
waxing, full, and waning, so three types of person can be defined. 



Individualists: born in the waxing moon phase, they have waxing energy. They 
like to work on their own, have strong wills, and are not discouraged by 
physical discomfort 

Socialists: born in the full moon phase, they like to live in communities. Key 
words for these people are 'compare', 'choose' and 'combine'. 
Cooperation is a dominant factor but there is also rivalry and envy 

Conservatives: born in the waning moon phase, they know that the light de- 
creases but will return again. They are careful and sure of themselves, and 
like to have everything under control 

These three types can be further subdivided to give twelve categories in all: 

149 



Pioneers are searchers, always ahead of the crowd. Their strength of purpose 
can sometimes make them appear stubborn 

«-§■ 

Coordinators like to be with other people, but feel that they are'more equal' 
than their companions. They are romantic and strongly attracted to 
family life 



o 



Realists look at the world in a very down-to-earth manner. They like to think 
that everything can be explained in purely physical terms 



m 



Spiritualists are rather 'other worldly' characters. Philosophical in outlook, 
they are seekers after the unknown 



<©> 



Artists transform material in a creative manner. They can produce works of 
art, new products, or anything that did not exist before 



150 




151 



Apostles are not themselves creative but spread the ideas of others to the world 
at large 



D 



Helpers take on responsibilities to their fellows that might otherwise be ig- 
nored. They are helpful and caring to others 




Leaders also assume responsibilities but in this case for directing the lives and 
actions of others. They look forward where most people would prefer to 
look back 







Knights are fearless adventurers, always searching for new things to explore. 
Idealistic in outlook, they have a strong sense of honor 



ft 



152 



Arbiters like to preside over the actions of others, they do not prejudge issues, 
but when they reach a decision they expect it to be obeyed 



S"& 



Revolutionaries are dissatisfied with the world as it is. They tend to look on the 
bad side of things, and have a desire to change the world 



fr 



Prophets consider the world 'from above' bringing to bear the wisdom of the 
past. They may not always be listened to, of course 



o 



The program will tell you the phase of the moon on the day you were born. 
From this you can discover the secrets of your character! 



153 



10 REIT ###### rioonphase Astrology ###### 

20 GRAPHICS 18 

30 OPEN #2,4*0, "K: * 

4t3 GOTO 5O0 

99 REfl ### read data ### 

100 NUIT=0 

110 GET #2,?<:? #6,CHR*<X>, 

120 IF K=155 THEN RETURN 

1 30 NUf l=NUri* 1 0+< X-48 > 

140 GOTO 110 

193 REfl ### INPUT DftTfi ### 

200 ? #6;" £Zt moonphase ttil" i 

210 POSITION 5,2:? #6, "ENTER DATE " 

220 POSITION 0,4:? #6,"DAV DO? "; 

230 GOSUB 100:DD=NL91 

240 ? #6,"flONTH m? "i 

250 GOSUB 100:i'!=NUf'l 

260 ? #6, "YEAR WW? ", 

270 GOSUB 100:V=NU!1 

280 IF PK3 THEN l y N'l+12: V=V-1 

290 RETURN 

299 REfl ### calculation ### 

300 T=1MT<365.25*V >+INk30.6#<fHl » 
310 T=< T+DD-634038 X'36525 

320 LA=350. 7374:56+ 1236£T*360+307*T 
330 LC)=LH+6*T^60+51. lS*T^3e0W 
340 LA=LA-5. 1 7*TtT ■'■3600 
350 LA=LA- 1 NT< UV360 >*360 
360 LA= I NT< LH+0 . 5 ) 
370 RETURN 

399 REIT ### display result ### 

400 POSITION 0,8 

410 ? *6,"roONPHHSE = ",I_A," DEG. " 

420 RETURN 

430 NUfNNUtl* 1 0+< X-48 > 

440 GOTO 410 

499 REI'I ##### main program ##### 

560 GOSUB 200: REIT input data # 

510 GOSUB 300: RE(") calculation # 

520 GOSUB 400: REI'I display result # 

530 GET #2,X:RUN 

154 



Does your brain get enough exercise? Are your wits as sharp, or your 
reactions as quick, as they should be? Tone up the muscles of your 
mind with this enthralling collection of arcade and action games, 
puzzles, brainteasers and competitions for your microcomputer. 

Battle with GALACTIC MONSTERS and ZOMBIES IN THE SWAMP, 
defend yourself against a SHIP'S ATTACK, and set out on a 
nerve-jangling SHARK HUNT. 

If you survive all that you can gamble at LAS VEGAS A GO GO 
and the KENTUCKY DERBY, plumb the mysteries of the BLACK BOX, 
and stretch your mind with intriguing board games like ONE TO FIVE, 
SHAKESPEARIAN SHUFFLE, and MINI MANCALA. Then.test your 
intellectual capabilities with VOWELS AND CONSONANTS, 
KEYBOARD MEMORY, and AT THE MARKET. Will you turn out to be 
a GENIUS AT WORK? 

By now you'll be razor sharp and ready for anything, which is just 
as well because you are not even halfway through yetl There's even 
more excitement, skill and fun for you, your family, and friends. So test 
your reflexes and mental prowess on this extraordinary obstacle course. 

What are you waiting for . . . on your marks, get set . . . GOI 




r ADDISON-WESLEY PUBLISHING COMPANY ISBN Q-2Dl-lb47?-T